How to implement switch statement in C# ? | |||
| |||
The types of the values a switch statement operates on can be booleans, enums, integral types, and strings. Following is the example. switch( strName) { case "james": strResult="male"; break; case "jane": strResult="female"; break; default: strResult = "unkonwn"; break; } Tags: C# Directory Selection foreach | |||
| |||
| |||
Login for comment |