語言

ReadOnlyMetadataCollection<T>.TryGetValue(String, Boolean, T) 方法

定義

利用指定的身份從此集合中檢索項目。

public:
 virtual bool TryGetValue(System::String ^ identity, bool ignoreCase, [Runtime::InteropServices::Out] T % item);
public virtual bool TryGetValue(string identity, bool ignoreCase, out T item);
abstract member TryGetValue : string * bool * 'T -> bool
override this.TryGetValue : string * bool * 'T -> bool
Public Overridable Function TryGetValue (identity As String, ignoreCase As Boolean, ByRef item As T) As Boolean

參數

identity
String

要搜尋的物品身份。

ignoreCase
Boolean

true執行大小寫不區分搜尋;否則,。 false

item
T

當此方法回傳時,輸出參數包含集合中的一個項目。 若無匹配項目,此輸出參數包含 null。

傳回

true如果有符合搜尋條件的項目;否則,。 false

適用於