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.

适用于