Export (0) Print
Expand All

XmlBinaryWriterSession.TryAdd Method

Tries to add an XmlDictionaryString to the internal collection.

Namespace:  System.Xml
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

public virtual bool TryAdd(
	XmlDictionaryString value,
	out int key
)

Parameters

value
Type: System.Xml.XmlDictionaryString
The XmlDictionaryString to add.
key
Type: System.Int32%
The key of the XmlDictionaryString that was successfully added.

Return Value

Type: System.Boolean
true, unless an exception was thrown.

ExceptionCondition
ArgumentNullException

value is null.

InvalidOperationException

An entry with key = key already exists.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft