Answer to Question #797 in C# for Arthur
Can we use [b]switch[/b] operator for strings?
1
2010-10-18T12:22:40-0400
Yes, the operator switch can be used with string variables and any integers.
The sample program would be
string command;
..........................
switch(command)
{
case "Mean"
{
.........
break;
}
case "Max"
{
............
break;
}
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C#
Comments
Leave a comment