[This is preliminary documentation and is subject to change.]
Namespace: NFXAssembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
public static TEnum AsEnum<TEnum>(
this string val,
TEnum dflt = null
)
where TEnum : struct, new()
public static TEnum AsEnum<TEnum>(
this string val,
TEnum dflt = null
)
where TEnum : struct, new()
<ExtensionAttribute>
Public Shared Function AsEnum(Of TEnum As {Structure, New}) (
val As String,
Optional dflt As TEnum = Nothing
) As TEnum
<ExtensionAttribute>
Public Shared Function AsEnum(Of TEnum As {Structure, New}) (
val As String,
Optional dflt As TEnum = Nothing
) As TEnum
public:
[ExtensionAttribute]
generic<typename TEnum>
where TEnum : value class, gcnew()
static TEnum AsEnum(
String^ val,
TEnum dflt = nullptr
)
public:
[ExtensionAttribute]
generic<typename TEnum>
where TEnum : value class, gcnew()
static TEnum AsEnum(
String^ val,
TEnum dflt = nullptr
)
static member AsEnum :
val : string *
?dflt : 'TEnum
(* Defaults:
let _dflt = defaultArg dflt null
*)
-> 'TEnum when 'TEnum : struct, new()
static member AsEnum :
val : string *
?dflt : 'TEnum
(* Defaults:
let _dflt = defaultArg dflt null
*)
-> 'TEnum when 'TEnum : struct, new()
- TEnum
Return Value
Type:
TEnumUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).