Share via


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

适用于