System::Collections::Generic::List::IndexOf method

List::IndexOf(const T&) const method

特定の項目の最初のインデックスを取得します。

int System::Collections::Generic::List<T>::IndexOf(const T &item) const override
パラメーター説明
項目const T&検索対象の項目。

ReturnValue

指定された項目の最初の出現位置、見つからない場合は -1。

参照

List::IndexOf(const T&, int) const method

リスト内の特定の項目を検索します。

int System::Collections::Generic::List<T>::IndexOf(const T &item, int index) const
パラメーター説明
項目const T&検索対象の項目。
インデックスint検索を開始するインデックス。

ReturnValue

指定された項目の最初のインスタンスのインデックス、見つからない場合は -1。

参照