Enumeration - How to do this?

Discussion in 'ASP .Net' started by shapper, Jan 22, 2007.

  1. shapper

    shapper Guest

    Hello,

    I am creating a new membership user and the status variable is an
    enumeration which can assume various values:

    MembershipCreateStatus.Success,
    MembershipCreateStatus.DuplicateEmail, etc.

    I need to create a string which is built as follows:

    Dim myString As String = "The result is: " & <status value>

    Where status value is "Success", "DuplicateEmail", etc ...

    How can I do this?

    Thanks,

    Miguel
    shapper, Jan 22, 2007
    #1
    1. Advertising

  2. shapper

    Aidy Guest

    Dim myEnum as MembershipCreateStatus = MembershipCreateStatus.Success
    Dim myString As String = "The result is: " & myEnum.ToString()

    "shapper" <> wrote in message
    news:...
    > Hello,
    >
    > I am creating a new membership user and the status variable is an
    > enumeration which can assume various values:
    >
    > MembershipCreateStatus.Success,
    > MembershipCreateStatus.DuplicateEmail, etc.
    >
    > I need to create a string which is built as follows:
    >
    > Dim myString As String = "The result is: " & <status value>
    >
    > Where status value is "Success", "DuplicateEmail", etc ...
    >
    > How can I do this?
    >
    > Thanks,
    >
    > Miguel
    >
    Aidy, Jan 22, 2007
    #2
    1. Advertising

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. Timothy Parez
    Replies:
    3
    Views:
    3,752
    WhatIThink
    Jun 29, 2010
  2. Jan Kindt
    Replies:
    5
    Views:
    2,014
    Allan Herriman
    Sep 12, 2003
  3. Replies:
    15
    Views:
    1,291
    Jerry Coffin
    Feb 1, 2005
  4. Charlie

    enumeration types

    Charlie, Feb 8, 2005, in forum: VHDL
    Replies:
    4
    Views:
    547
    Charlie
    Feb 9, 2005
  5. puvit82
    Replies:
    4
    Views:
    742
    puvit82
    Feb 1, 2008
Loading...

Share This Page