Tag Archives: case

Understand ways to end case blocks in C#

There are several ways that you can exit case blocks in a switch statement. For example, consider the following code. string result = “”; int control = 1; switch (control) { case 1: case 2: result = “One or two”; … Continue reading

Posted in syntax | Tagged , , , , , , , , , , | 2 Comments

Make TextBoxes automatically convert case in C#

It’s actually quite easy to make a TextBox convert case in .NET. Simply set the TextBox control’s CharacterCasing property to Lower or Upper. Then the control automatically converts alphabetic characters into the correct case. You can do this at design … Continue reading

Posted in controls, strings, user interface | Tagged , , , , , , , , , , , , | Leave a comment