enum Months {Jan, Feb, March, April,
May, June, July, August, Sept, Oct, Nov, Dec};
enum Months2 {Jan = 1, Feb, March, April,
May, June, July, August, Sept, Oct, Nov, Dec};
public void Page_Load(object sender, EventArgs e)
{
int x = (int) Months.Feb;
int y = (int) Months.Oct;
Response.Write(" Feb is month #" + x);
Response.Write(" Oct is month #" + y);
x = (int) Months2.Feb;
y = (int) Months2.Oct;
Response.Write(" Feb is now month #" + x);
Response.Write(" Oct is now month #" + y);
}
|