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

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. -

    enum within an enum

    -, Jun 12, 2005, in forum: Java
    Replies:
    6
    Views:
    828
  2. Jerminia
    Replies:
    3
    Views:
    817
    Roedy Green
    Oct 7, 2005
  3. Ernst Murnleitner

    How to enum an enum?

    Ernst Murnleitner, Nov 12, 2003, in forum: C++
    Replies:
    5
    Views:
    777
    Rolf Magnus
    Nov 13, 2003
  4. Stefan Mueller
    Replies:
    5
    Views:
    712
    Steven Saunderson
    Jul 10, 2006
  5. Chad
    Replies:
    2
    Views:
    346
    Charlie Gordon
    Sep 18, 2007
  6. John Joyce

    gets gets

    John Joyce, Mar 26, 2007, in forum: Ruby
    Replies:
    2
    Views:
    536
    John Joyce
    Mar 26, 2007
  7. John Joyce

    Return of gets gets

    John Joyce, Apr 23, 2007, in forum: Ruby
    Replies:
    0
    Views:
    306
    John Joyce
    Apr 23, 2007
  8. libsfan01
    Replies:
    5
    Views:
    509
    Jeff North
    Dec 20, 2006
Loading...