|
EnumExtensionsGetEnumValueByDescription Method
|
Gets the enumeration of the specified type whose description matches this description.
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax public static Object GetEnumValueByDescription(
this string description,
Type type,
bool ignoreCase = false
)
[<ExtensionAttribute>]
static member GetEnumValueByDescription :
description : string *
type : Type *
?ignoreCase : bool
(* Defaults:
let _ignoreCase = defaultArg ignoreCase false
*)
-> Object
GSF.EnumExtensions.GetEnumValueByDescription = function(description, type, ignoreCase);
View SourceParameters
- description String
- Description to be used for lookup of the enumeration.
- type Type
- Type of the enumeration.
- ignoreCase Boolean (Optional)
- true to ignore case during the comparison; otherwise, false.
Return Value
ObjectAn enumeration of the specified
type if a match is found, otherwise null.
Usage 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).
Exceptions See Also