次の方法で共有


ContextLinkCollection.IndexOf メソッド

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

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

構文

'宣言
Public Function IndexOf ( _
    link As ContextLink _
) As Integer
'使用
Dim instance As ContextLinkCollection
Dim link As ContextLink
Dim returnValue As Integer

returnValue = instance.IndexOf(link)
public int IndexOf(
    ContextLink link
)
public:
int IndexOf(
    ContextLink^ link
)
public int IndexOf(
    ContextLink link
)
public function IndexOf(
    link : ContextLink
) : int

パラメータ

戻り値

型 : System.Int32
ContextLinkCollection 内にある特定の ContextLink オブジェクトを指定するインデックス。

解説

ContextLinkCollection コレクション内に存在しない ContextLink オブジェクトが渡された場合、IndexOf は -1 を返します。

この例では、links という名前の ContextLinkCollection に格納されている可能性がある myLink という名前の特定の ContextLink のインデックスを検索する方法を示します。

Dim index As Integer = links.IndexOf(myLink)
int index = links.IndexOf(myLink);

プラットフォーム

Windows Vista

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

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

ContextLinkCollection クラス

ContextLinkCollection メンバ

System.Windows.Ink 名前空間