|
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.253-beta+ffb7163c9e3b771705bc5b9aa3f09870f2cb9e2c
Syntaxpublic 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