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

定义

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

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

protected:
 override Microsoft::JScript::JSVariableField ^ CreateField(System::String ^ name, System::Reflection::FieldAttributes attributeFlags, System::Object ^ value);
protected override Microsoft.JScript.JSVariableField CreateField (string name, System.Reflection.FieldAttributes attributeFlags, object value);
override this.CreateField : string * System.Reflection.FieldAttributes * obj -> Microsoft.JScript.JSVariableField
Protected Overrides 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 the field.

value
Object

字段的值。The value of the field.

返回

JSVariableField

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

适用于

另请参阅