C# Developers' Journal (original) (raw)
Case else and Font.Bold Case Else?
How do I do Case Else in C# like in VB? (Like having a few case statments, and then having a line that means if something isn't equal to any of the other cases)
Font.Bold
if(txtCmd.Text.StartsWith("!"))
{
txtCmd.Font.Bold = true;
}
else
{
txtCmd.Font.Bold = false;
}
The error is "txtCmd.Font.Bold = true;". It says its read only... anyway to get around that?
Thanks.