T
TS
i used to do this in vb and haven't been able to in c# - any workaround?
switch (true)TS said:i used to do this in vb and haven't been able to in c# - any workaround?
<snip>TS said:thanks, yes i am looking for a
switch(true)
{
case var1 = 5 : ...
case var9 = 21: ...
i guess you can't do it as i thought
Christof Nordiek said:<snip>
you can:
the c# equivalent is:
if (var1 == 5)
{
.....
}
else if (var9 == 21)
{
......
}
.......