指定した DesignerVerb のインデックスを取得します。
名前空間: System.ComponentModel.Design
アセンブリ: System (system.dll 内)
構文
'宣言
Public Function IndexOf ( _
value As DesignerVerb _
) As Integer
'使用
Dim instance As DesignerVerbCollection
Dim value As DesignerVerb
Dim returnValue As Integer
returnValue = instance.IndexOf(value)
public int IndexOf (
DesignerVerb value
)
public:
int IndexOf (
DesignerVerb^ value
)
public int IndexOf (
DesignerVerb value
)
public function IndexOf (
value : DesignerVerb
) : int
パラメータ
- value
コレクション内のインデックスを取得する対象の DesignerVerb。
戻り値
指定したオブジェクトのインデックスがリスト内に見つかった場合はそのインデックス。見つからなかった場合は -1。
使用例
' 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
// 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 );
// 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.0、1.1、1.0
参照
関連項目
DesignerVerbCollection クラス
DesignerVerbCollection メンバ
System.ComponentModel.Design 名前空間