XmlBinaryWriterSession.TryAdd Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Tries to add an XmlDictionaryString to the internal collection.
Assembly: System.Runtime.Serialization (in System.Runtime.Serialization.dll)
Parameters
- value
- Type: System.Xml.XmlDictionaryString
The XmlDictionaryString to add.
- key
- Type:
System.Int32
%
The key of the XmlDictionaryString that was successfully added.
| Exception | Condition |
|---|---|
| ArgumentNullException | value is null. |
| InvalidOperationException | An entry with key = key already exists. |
Show: