Click or drag to resize

imbTypeEnumExtensionsimbToEnumeration Method (Object, Type, Enum)

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Convers an value to the best fit Enumeration member

Namespace:  imbSCI.Core.extensions.enumworks
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static Enum imbToEnumeration(
	this Object input,
	Type enumerationType,
	Enum onTrueEnum = null
)
Request Example View Source

Parameters

input
Type: SystemObject
enumerationType
Type: SystemType
onTrueEnum (Optional)
Type: SystemEnum

Return Value

Type: Enum
Enum member that matches input value

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. 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).
Remarks
Kada input spada u kategorije: Boolean - ako je true onda mu zadaje onTrueEnum, za False ide prvi enum Enumeration - koristi findEnumerationMember() method> prvo same, starts, end, contains pa na kraju default int32 Instance - koristi ime klase za findEnumerationMember()
See Also