Retrieves the string enum field name from a .NET Enum value.
Enums are stored as numeric values internally. This function
o.GetEnumString(lcEnumType, lvEnumValue)
Parameters
lcEnumType
The type of the Enumeration as a string:
System.Windows.Forms.MessageBoxIcon
lvEnumValue
The actual enumerated value (typically numeric). ie. Button3
Remarks
Note that some enumerations end up with the same value assigned to a single enumerated item. For example the System.Windows.Forms.MessageBoxIcon enum has 48 assigned both to Warning and Exclamation. Only one of these values is returned (Warning in this case).
Example
lnEnum = loBridge.GetEnumValue("System.Windows.Forms.MessageBoxIcon.Warning")
? lnEnum && 48
*** Prints 'Warning'
? loBridge.GetEnumString("System.Windows.Forms.MessageBoxIcon",lnEnum)
See also:
Class wwDotNetBridge© West Wind Technologies, 2004-2020 • Updated: 06/07/17
Comment or report problem with topic