Is there a way to check multiple things without doing a lot of if-statements?
I want to do like this, but in an easier way:
if System.DateTime.Now().Month.ToString(“MMM”) = "JAN" then blabla
else if System.DateTime.Now().Month.ToString(“MMM”) = "FEB" then blabla
else if System.DateTime.Now().Month.ToString(“MMM”) = "MAR" then blabla
Best thing would be if there exist anything like:
if System.DateTime.Now().Month.ToString(“MMM”) = {"JAN", "FEB", "MAR"} then {blabla1, blabla2, blabla3}
Thank you guys, it worked for the problem I described. But I have read it does not work with String.Contains(), is there any smarter way than doing tons of if-statements for that?
In that case, you may want to either to use a flowchart layout or even the “Invoke code” Activity, which will allow you to invoke VB.Net code directly.
Both approaches can be useful when you have a lot of decisions to handle, to keep the solution readable.