Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting string value from enum
Message
From
30/07/2008 17:12:52
 
 
To
29/07/2008 17:49:30
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01335097
Message ID:
01335366
Views:
11
Hi Tim

Here's a version in VB.Net....TransferType is the enum.

Public Shared Function GetTransferType(ByVal value As String) As TransferType
Dim theTransferType As TransferType

Try
theTransferType = CType(System.Enum.Parse(GetType(TransferType), value, True), TransferType)
Catch ex As Exception
theTransferType = TransferType.Unknown
End Try

Return theTransferType
End Function
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform