Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent CLRObject instance.
Syntax
client server public static CLRObject parseClrEnum(str clrEnumTypeName, str enumValues)
Run On
Called
Parameters
- clrEnumTypeName
Type: str
The name of the type of CLR enumeration.
- enumValues
Type: str
A string that contains the name or value to convert.
Return Value
Type: CLRObject Class
The CLRObject instance that contains the specified CLR enumerator values.
Remarks
The _enumValues parameter contains a value, a named constant, or a list of named constants that are delimited by commas (,). One or more blanks spaces can precede or follow each value, name, or comma in _enumValues. If _enumValues is a list, the return value is the value of the specified names combined with a bitwise OR operation.
Examples
The following example converts the enumerator value to the string value of Monday and prints the value in the Infolog.
static void Job6(Args _args)
{
System.DayOfWeek dayOfWeek;
System.Type dayOfWeekType;
dayOfWeek = CLRInterop::parseClrEnum( "System.DayOfWeek", "Monday");
dayOfWeekType = dayOfWeek.GetType();
info( dayOfWeek.ToString() );
}