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

適用於