ContextStack.Item[] プロパティ

定義

指定したレベルのスタック上のオブジェクトを取得または設定します。

オーバーロード

名前 説明
Item[Int32]

指定したレベルのスタック上のオブジェクトを取得します。

Item[Type]

指定した型を継承または実装するスタック上の最初のオブジェクトを取得します。

Item[Int32]

ソース:
ContextStack.cs
ソース:
ContextStack.cs
ソース:
ContextStack.cs
ソース:
ContextStack.cs
ソース:
ContextStack.cs

指定したレベルのスタック上のオブジェクトを取得します。

public:
 property System::Object ^ default[int] { System::Object ^ get(int level); };
public object? this[int level] { get; }
public object this[int level] { get; }
member this.Item(int) : obj
Default Public ReadOnly Property Item(level As Integer) As Object

パラメーター

level
Int32

スタックで取得するオブジェクトのレベル。 レベル 0 はスタックの最上位、レベル 1 は次のダウンなどです。 このレベルは 0 以上である必要があります。 level がスタック上のレベルの数より大きい場合は、 nullを返します。

プロパティ値

指定したレベルのスタック上のオブジェクト。そのレベルにオブジェクトが存在しない場合は null

例外

level が 0 未満です。

適用対象

Item[Type]

ソース:
ContextStack.cs
ソース:
ContextStack.cs
ソース:
ContextStack.cs
ソース:
ContextStack.cs
ソース:
ContextStack.cs

指定した型を継承または実装するスタック上の最初のオブジェクトを取得します。

public:
 property System::Object ^ default[Type ^] { System::Object ^ get(Type ^ type); };
public object this[Type type] { get; }
member this.Item(Type) : obj
Default Public ReadOnly Property Item(type As Type) As Object

パラメーター

type
Type

コンテキスト スタックから取得する型。

プロパティ値

指定した型を継承または実装するスタック上の最初のオブジェクト。スタック上のオブジェクトが型を実装していない場合は null

例外

typenullです。

注釈

スタックの各レベルでチェックが行われ、 typeを実装または継承するオブジェクトが検索されます。 一致が見つかった場合は、返されます。

適用対象