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

定義

使用指定的名稱、值和屬性,建立新的全域變數。

此 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

欄位的名稱。

attributeFlags
FieldAttributes

列舉值的位元組合,這些值描述欄位的屬性。 會自動加入 Static

value
Object

此欄位的值。

傳回

JSVariableField

具有指定之名稱、值和屬性的全域變數。

適用於

另請參閱