New Method

Creates a new enum.

Syntax

Sub New(val, enumValue)


Parameters


val

Type: Byte

The value of the enum


enumValue

Type: String

The possible values of the enum, separated by a semicolon (;)



Return Value


Type: VSEnumPropertyVale

Examples

IronPython

#Create enum

myEnum = VSEnumPropertyValue(1, "red;amber;green")
var = VSVariable(varName, VSVariableDataType.Enumerator, myEnum, varName + " (set by IronPython script)", False, VSVariableDefinitionType.VSDynamic)
Host.ScriptData.Variable[varName] = var


C#

//Create enum

VSEnumPropertyValue myEnum = new VSEnumPropertyValue(1, "first;second;third");
VSVariable var = new VSVariable(varName, VSVariableDataType.Enumerator, myEnum, varName + " (set by C# script)", false, VSVariableDefinitionType.VSDynamic);
ScriptData.set_Variable(varName, var);

Remarks