Private Submit_click(s,e)
{
int day = (int)day_textbox.text;
switch (day)
{
case 0 :
dayName = "Sunday";
break;
case 1 :
dayName = "Monday";
break;
case 2 :
dayName = "Tuesday";
break;
...
default :
dayName = "Unknown";
break;
}
dispayDay_textbox.Text = dayName;
}
//example 2
switch (current)
{
case '<':
target.Text += "<";
break;
case '>':
target.Text += ">";
break;
case '&':
target.Text += "&";
break;
case '\"':
target.Text += """;
break;
case '\'':
target.Text += "'";
break;
default:
target.Text += current;
break;
}
int result;
if (leftHandSide.Year < rightHandSide.Year)
{
result = -1;
}
else if (leftHandSide.Year > rightHandSide.Year)
{
result = 1;
}
else
{
result = 2;
}