T
TryParse<T> Method
See Also 
SourceCode.SmartObjects.Authoring.Extensions Namespace > EnumExtensions Class : TryParse<T> Method



theEnum
value
result

Glossary Item Box

Syntax

Visual Basic (Declaration)  
<ExtensionAttribute()>
Public Shared Function TryParse(Of T As {New, Struct})( _
   ByVal theEnum As T, _
   ByVal value As Object, _
   ByRef result As T _
) As Boolean
Visual Basic (Usage) Copy Code
Dim theEnum As T
Dim value As Object
Dim result As T
Dim value As Boolean
 
value = EnumExtensions.TryParse(Of T)(theEnum, value, result)
C#  
[Extension()]
public static bool TryParse<T>( 
   T theEnum,
   object value,
   out T result
)
where T: new(), struct
C++/CLI  
[Extension()]
public:
static bool TryParsegeneric<typename T>
( 
   T^ theEnum,
   Object^ value,
   [Out] T^ result
) 
where T: gcnew(), value class

Parameters

theEnum
value
result

Type Parameters

T

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also