Share via


ItemsSourceView.IndexOf(Object) 方法

定義

擷取指定專案的索引。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

public:
 virtual int IndexOf(Platform::Object ^ item) = IndexOf;
int IndexOf(IInspectable const& item);
public int IndexOf(object item);
Public Function IndexOf (item As Object) As Integer

參數

item
Object

Platform::Object

IInspectable

要在集合中尋找的物件。

傳回

Int32

int

如果找到,則為要尋找之專案的索引。

適用於