hello friends,
Actually enum contains a collection of integer constants.
In button1_click i declared i as an integer only then what is the need for typecasting?
enum gtb
{
sa=12
}
private void button1_Click(object sender, EventArgs e)
{
int i;
// i = gtb.sa;
i=(int)gtb.sa ;
MessageBox.Show(i.ToString());
}





Reply With Quote