Enumeration - How to do this?

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

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
 
Dim myEnum as MembershipCreateStatus = MembershipCreateStatus.Success
Dim myString As String = "The result is: " & myEnum.ToString()
 
Back
Top