You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem when I convert a code that has a select case (string) and the option (project) is option compare Text (and not Binary). when I run the converted program, the comparaison is binary instead of Text
ReturnsFalseMessageBox.Show(Conversions.ToString(Test("test")));privateboolTest(stringastr_Temp){switch(astr_Temp){case"Test":{returntrue;}default:{returnfalse;}}}Ifrelevant,the incorrectly converted output,or an exception with stack trace.
Expected output
Itshould return True
It could be (forexample)privateboolTest(stringastr_Temp){switch(astr_Temp.ToUpperInvariant()){case"TEST":{returntrue;}default:{returnfalse;}}}// Or Better privateboolTest(stringastr_Temp){switch(true){caseboolTmpwhenastr_Temp.Equals("Test",StringComparison.InvariantCultureIgnoreCase):{returntrue;}caseboolTmpwhenastr_Temp.Equals("Test2",StringComparison.InvariantCultureIgnoreCase):{returntrue;}default:{returnfalse;}}}
Details
Product in use: Last version
The text was updated successfully, but these errors were encountered:
Ah yes. Didn't know about that but it totally makes sense. I'll have a look soonish
It probably needs some null coalescing as well
Also the pattern in #323 could work, though it's hard to do for vs2017 since the syntax hadn't been invented yet
Hello,
There is a problem when I convert a code that has a select case (string) and the option (project) is option compare Text (and not Binary). when I run the converted program, the comparaison is binary instead of Text
Thank you for the help
Marc
Input code
Erroneous output
Expected output
Details
The text was updated successfully, but these errors were encountered: