Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch (Type)
- {
- case Type.A:
- string variable = "x";
- break;
- case Type.B:
- string variable = "y";
- break;
- }
- switch (Type)
- {
- case Type.A:
- {
- string variable = "x";
- /* do other stuff with variable */
- }
- break;
- case Type.B:
- {
- string variable = "y";
- /* do other stuff with variable */
- }
- break;
- }
- switch (Type)
- {
- string variable;
- case Type.A:
- variable = "x";
- break;
- case Type.B:
- variable = "y";
- break;
- }
Add Comment
Please, Sign In to add comment