Enum gets initalized to first value

Discussion in '.NET' started by mhshpk, Aug 30, 2007.

  1. mhshpk

    mhshpk

    Joined:
    Jul 12, 2007
    Messages:
    6
    Likes Received:
    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?
     
    mhshpk, Aug 30, 2007
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.