次の方法で共有


ContextNodeBaseCollection.IndexOf メソッド (ContextNodeBase)

ContextNodeBaseCollection 内の特定の ContextNodeBase オブジェクトのインデックスを返します。

名前空間 :  System.Windows.Ink.AnalysisCore
アセンブリ :  IACore (IACore.dll 内)

構文

'宣言
Public Function IndexOf ( _
    node As ContextNodeBase _
) As Integer
'使用
Dim instance As ContextNodeBaseCollection
Dim node As ContextNodeBase
Dim returnValue As Integer

returnValue = instance.IndexOf(node)
public int IndexOf(
    ContextNodeBase node
)
public:
int IndexOf(
    ContextNodeBase^ node
)
public int IndexOf(
    ContextNodeBase node
)
public function IndexOf(
    node : ContextNodeBase
) : int

パラメータ

戻り値

型 : System.Int32
ContextNodeBaseCollection 内の特定の ContextNodeBase オブジェクトのインデックス。

解説

ContextNodeBaseCollection に存在しない ContextNodeBase オブジェクトが渡された場合、このメソッドは -1 を返します。

次の例では、nodes という名前の ContextNodeBaseCollection に格納されている可能性のある myNode という名前の特定の ContextNodeBase のインデックスを検索する方法を示します。

Dim index As Integer = nodes.IndexOf(myNode)
            int index = nodes.IndexOf(myNode);

プラットフォーム

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

ContextNodeBaseCollection クラス

ContextNodeBaseCollection メンバ

IndexOf オーバーロード

System.Windows.Ink.AnalysisCore 名前空間