Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting string value from enum
Message
De
30/07/2008 17:12:52
 
 
À
29/07/2008 17:49:30
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01335097
Message ID:
01335366
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform