JAMS Developer Guide
GetEnumOrDefault<T> Method


MVPSI.JAMS.Host Namespace > PropertyValueCollection Class : GetEnumOrDefault<T> Method
Returns the enum value of the property, if possible; otherwise, the default.
Syntax
'Declaration
 
Public Function GetEnumOrDefault(Of T)( _
   ByVal enumType As System.Type, _
   ByVal propertyName As System.String, _
   ByVal defaultValue As T _
) As T
'Usage
 
Dim instance As PropertyValueCollection
Dim enumType As System.Type
Dim propertyName As System.String
Dim defaultValue As T
Dim value As T
 
value = instance.GetEnumOrDefault(Of T)(enumType, propertyName, defaultValue)
public T GetEnumOrDefault<T>( 
   System.Type enumType,
   System.string propertyName,
   T defaultValue
)

Parameters

enumType
propertyName
defaultValue

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

Reference

PropertyValueCollection Class
PropertyValueCollection Members