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

指定した DesignerVerbインデックス取得します

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

Visual Basic (宣言)

Public Function IndexOf ( _ value As DesignerVerb _ ) As Integer

Visual Basic (使用法)

Dim instance As DesignerVerbCollection Dim value As DesignerVerb Dim returnValue As Integer

returnValue = instance.IndexOf(value)

C#

public int IndexOf ( DesignerVerb value )

C++

public: int IndexOf ( DesignerVerb^ value )

J#

public int IndexOf ( DesignerVerb value )

JScript

public function IndexOf ( value : DesignerVerb ) : int

パラメータ

value

コレクション内のインデックス取得する対象の DesignerVerb。

戻り値
指定したオブジェクトインデックスリスト内に見つかった場合はそのインデックス見つからなかった場合は -1。

使用例使用例

Visual Basic

' Tests for the presence of a DesignerVerb in the collection, ' and retrieves its index if it is found. Dim testVerb As New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)) Dim itemIndex As Integer = -1 If collection.Contains(testVerb) Then itemIndex = collection.IndexOf(testVerb) End If

C#

// Tests for the presence of a DesignerVerb in the collection, // and retrieves its index if it is found. DesignerVerb testVerb = new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)); int itemIndex = -1; if( collection.Contains( testVerb ) ) itemIndex = collection.IndexOf( testVerb );

C++

// Tests for the presence of a DesignerVerb in the collection, // and retrieves its index if it is found. DesignerVerb^ testVerb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ); int itemIndex = -1; if ( collection->Contains( testVerb ) ) itemIndex = collection->IndexOf( testVerb );

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

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

参照参照

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