RhinoCommon API
GetBaseClassAddOptionEnumListT Method (String, T, T) |
Adds a choice of enumerated values as list option. Allows to include only some enumerated values.
Namespace: Rhino.Input.Custom
Assembly: RhinoCommon (in RhinoCommon.dll)
Since: 6.0

public int AddOptionEnumList<T>( string englishOptionName, T defaultValue, T[] include ) where T : struct, new(), IConvertible
Public Function AddOptionEnumList(Of T As {Structure, New, IConvertible}) ( englishOptionName As String, defaultValue As T, include As T() ) As Integer
Parameters
- englishOptionName
- Type: SystemString
The name of the option - defaultValue
- Type: T
The default value - include
- Type: T
An array of enumerated values to use. This argument can also be null; in this case, the whole enumerated is used.
Type Parameters
- T
- The enumerated type
Return Value
Type: Int32Option index

Exception | Condition |
---|---|
ArgumentException | Gets thrown if defaultValue provided is not an enumerated type. |
