次の方法で共有


XmlDictionaryString Constructor

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Creates an instance of the XmlDictionaryString class.

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

Syntax

'Declaration
Public Sub New ( _
    dictionary As IXmlDictionary, _
    value As String, _
    key As Integer _
)
public XmlDictionaryString(
    IXmlDictionary dictionary,
    string value,
    int key
)

Parameters

  • value
    Type: System.String
    The string that is the value of the dictionary entry.
  • key
    Type: System.Int32
    The integer that is the key of the dictionary entry.

Exceptions

Exception Condition
ArgumentNullException

value is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

key is less than 0 or greater than MaxValue / 4.

Remarks

The XmlDictionaryString does not automatically add itself to the specified dictionary.

If the dictionary parameter is nulla null reference (Nothing in Visual Basic), the XmlDictionaryString is created with a key of 0 and the value set to an empty string.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

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