Enum gets initalized to first value

Joined
Jul 12, 2007
Messages
6
Reaction score
0
I've defined an enum as below
public enum Modes
{
Add,
Edit,
Update
}

& i am using it in my page with global scope i.e before page_load

Modes _currentMode;
by default currentMode gets initalized to "Add" & always to the first value in the enum.
Is this normal behaviour?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top