XmlBinaryReaderSession.TryLookup 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
檢查內部集合是否包含條目。
多載
| 名稱 | Description |
|---|---|
| TryLookup(Int32, XmlDictionaryString) |
檢查內部集合是否包含與鍵相符的條目。 |
| TryLookup(String, XmlDictionaryString) |
檢查內部集合是否包含與某值相符的條目。 |
| TryLookup(XmlDictionaryString, XmlDictionaryString) |
檢查內部集合是否包含與某值相符的條目。 |
TryLookup(Int32, XmlDictionaryString)
檢查內部集合是否包含與鍵相符的條目。
public:
virtual bool TryLookup(int key, [Runtime::InteropServices::Out] System::Xml::XmlDictionaryString ^ % result);
public bool TryLookup(int key, out System.Xml.XmlDictionaryString result);
public bool TryLookup(int key, out System.Xml.XmlDictionaryString? result);
abstract member TryLookup : int * XmlDictionaryString -> bool
override this.TryLookup : int * XmlDictionaryString -> bool
Public Function TryLookup (key As Integer, ByRef result As XmlDictionaryString) As Boolean
參數
- key
- Int32
搜尋的關鍵。
- result
- XmlDictionaryString
當此方法回傳時,若找到條目,則包含字串;否則,。 null 這個參數會未初始化傳遞。
傳回
true 若找到與 相 key 符的條目;否則, false。
實作
例外狀況
key 是 null。
適用於
TryLookup(String, XmlDictionaryString)
檢查內部集合是否包含與某值相符的條目。
public:
virtual bool TryLookup(System::String ^ value, [Runtime::InteropServices::Out] System::Xml::XmlDictionaryString ^ % result);
public bool TryLookup(string value, out System.Xml.XmlDictionaryString result);
public bool TryLookup(string value, out System.Xml.XmlDictionaryString? result);
abstract member TryLookup : string * XmlDictionaryString -> bool
override this.TryLookup : string * XmlDictionaryString -> bool
Public Function TryLookup (value As String, ByRef result As XmlDictionaryString) As Boolean
參數
- value
- String
要搜尋的值。
- result
- XmlDictionaryString
當此方法回傳時,若找到條目,則包含字串;否則,。 null 這個參數會未初始化傳遞。
傳回
true 若找到與 相 value 符的條目;否則, false。
實作
例外狀況
value 是 null。
適用於
TryLookup(XmlDictionaryString, XmlDictionaryString)
檢查內部集合是否包含與某值相符的條目。
public:
virtual bool TryLookup(System::Xml::XmlDictionaryString ^ value, [Runtime::InteropServices::Out] System::Xml::XmlDictionaryString ^ % result);
public bool TryLookup(System.Xml.XmlDictionaryString value, out System.Xml.XmlDictionaryString result);
public bool TryLookup(System.Xml.XmlDictionaryString value, out System.Xml.XmlDictionaryString? result);
abstract member TryLookup : System.Xml.XmlDictionaryString * XmlDictionaryString -> bool
override this.TryLookup : System.Xml.XmlDictionaryString * XmlDictionaryString -> bool
Public Function TryLookup (value As XmlDictionaryString, ByRef result As XmlDictionaryString) As Boolean
參數
- value
- XmlDictionaryString
要搜尋的值。
- result
- XmlDictionaryString
當此方法回傳時,若找到條目,則包含字串;否則,。 null 這個參數會未初始化傳遞。
傳回
true 若找到與 相 value 符的條目;否則, false。
實作
例外狀況
value 是 null。