ContextStack.Push メソッドとは何? わかりやすく解説 Weblio辞書 (original) (raw)

指定したオブジェクトスタックプッシュ (格納) します。

名前空間: System.ComponentModel.Design.Serialization
アセンブリ: System (system.dll 内)
構文構文

Visual Basic (宣言)

Public Sub Push ( _ context As Object _ )

Visual Basic (使用法)

Dim instance As ContextStack Dim context As Object

instance.Push(context)

C#

public void Push ( Object context )

C++

public: void Push ( Object^ context )

J#

public void Push ( Object context )

JScript

public function Push ( context : Object )

パラメータ

context

スタックプッシュするコンテキスト オブジェクト

例外例外

例外種類 条件
ArgumentNullException contextnull 参照 (Visual Basic では Nothing) です。

使用例使用例

ContextStack に値をプッシュするコード例次に示します

Visual Basic

' Push ten items on to the stack and output the value of each. Dim number As Integer For number = 0 To 9 Console.WriteLine(("Value pushed to stack: " + number.ToString())) stack.Push(number) Next number

C#

// Push ten items on to the stack and output the value of each. for( int number = 0; number < 10; number ++ ) { Console.WriteLine( "Value pushed to stack: "+number.ToString() ); stack.Push( number ); }

C++

// Push ten items on to the stack and output the value of each. for ( int number = 0; number < 10; number++ ) { Console::WriteLine( "Value pushed to stack: {0}", number ); stack->Push( number ); }

プラットフォームプラットフォーム

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

開発プラットフォーム中には.NET Framework によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.01.11.0

参照参照

関連項目
ContextStack クラス
ContextStack メンバ
System.ComponentModel.Design.Serialization 名前空間