編集

次の方法で共有


IXmlDictionary.TryLookup Method

Definition

Attempts to look up an entry in the dictionary.

Overloads

TryLookup(Int32, XmlDictionaryString)

Attempts to look up an entry in the dictionary.

TryLookup(String, XmlDictionaryString)

Checks the dictionary for a specified string value.

TryLookup(XmlDictionaryString, XmlDictionaryString)

Checks the dictionary for a specified XmlDictionaryString.

Remarks

This method avoids throwing an exception if the entry is not currently in the dictionary.

TryLookup(Int32, XmlDictionaryString)

Source:
IXmlDictionary.cs
Source:
IXmlDictionary.cs
Source:
IXmlDictionary.cs

Attempts to look up an entry in the dictionary.

public:
 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
Public Function TryLookup (key As Integer, ByRef result As XmlDictionaryString) As Boolean

Parameters

key
Int32

Key to look up.

result
XmlDictionaryString

If key is defined, the XmlDictionaryString that is mapped to the key; otherwise null.

Returns

true if key is in the dictionary; otherwise, false.

Applies to

TryLookup(String, XmlDictionaryString)

Source:
IXmlDictionary.cs
Source:
IXmlDictionary.cs
Source:
IXmlDictionary.cs

Checks the dictionary for a specified string value.

public:
 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
Public Function TryLookup (value As String, ByRef result As XmlDictionaryString) As Boolean

Parameters

value
String

String value being checked for.

result
XmlDictionaryString

The corresponding XmlDictionaryString, if found; otherwise, null.

Returns

true if value is in the dictionary; otherwise, false.

Applies to

TryLookup(XmlDictionaryString, XmlDictionaryString)

Source:
IXmlDictionary.cs
Source:
IXmlDictionary.cs
Source:
IXmlDictionary.cs

Checks the dictionary for a specified XmlDictionaryString.

public:
 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
Public Function TryLookup (value As XmlDictionaryString, ByRef result As XmlDictionaryString) As Boolean

Parameters

value
XmlDictionaryString

The XmlDictionaryString being checked for.

result
XmlDictionaryString

The matching XmlDictionaryString, if found; otherwise, null.

Returns

true if XmlDictionaryString is in the dictionary; otherwise, false.

Applies to