ArrayPrototype.push(Object, Object[]) 方法

定義

將新元素加入至指定之陣列的結尾。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 static long push(System::Object ^ thisob, ... cli::array <System::Object ^> ^ args);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject | Microsoft.JScript.JSFunctionAttributeEnum.HasVarArgs, Microsoft.JScript.JSBuiltin.Array_push)]
public static long push (object thisob, params object[] args);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject | Microsoft.JScript.JSFunctionAttributeEnum.HasVarArgs, Microsoft.JScript.JSBuiltin.Array_push)>]
static member push : obj * obj[] -> int64
Public Shared Function push (thisob As Object, ParamArray args As Object()) As Long

參數

thisob
Object

這個方法執行位置的物件。

args
Object[]

要加入至 thisob 的元素。

傳回

Int64

thisob 的新長度。

屬性

適用於

另請參閱