ActivationObject.CreateField(String, FieldAttributes, Object) 方法

定义

使用指定的名称、值和特性创建一个新全局变量。Creates a new global variable, using the specified name, value, and attributes.

此 API 支持产品基础结构,不能在代码中直接使用。

protected:
 virtual Microsoft::JScript::JSVariableField ^ CreateField(System::String ^ name, System::Reflection::FieldAttributes attributeFlags, System::Object ^ value);
protected virtual Microsoft.JScript.JSVariableField CreateField (string name, System.Reflection.FieldAttributes attributeFlags, object value);
abstract member CreateField : string * System.Reflection.FieldAttributes * obj -> Microsoft.JScript.JSVariableField
override this.CreateField : string * System.Reflection.FieldAttributes * obj -> Microsoft.JScript.JSVariableField
Protected Overridable Function CreateField (name As String, attributeFlags As FieldAttributes, value As Object) As JSVariableField

参数

name
String

字段的名称。The name of the field.

attributeFlags
FieldAttributes

枚举值的一个按位组合,这些枚举值描述字段的特性。A bitwise combination of the enumeration values that describe the attributes of a field. Static 会自动添加。Static is added automatically.

value
Object

字段的值。The value of the field.

返回

JSVariableField

具有指定名称、值和特性的全局变量。A global variable that has the specified name, value, and attributes.

适用于

另请参阅