Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SerializationInfo.AddValue Method (String, Char)

.NET Framework 1.1

Adds a Unicode character value into the SerializationInfo.

[Visual Basic]
Overloads Public Sub AddValue( _
   ByVal name As String, _
   ByVal value As Char _
)
[C#]
public void AddValue(
 string name,
 char value
);
[C++]
public: void AddValue(
 String* name,
 __wchar_t value
);
[JScript]
public function AddValue(
   name : String,
 value : Char
);

Parameters

name
The name to associate with the value, so it can be deserialized later.
value
The character value to serialize.

Exceptions

Exception Type Condition
ArgumentNullException The name parameter is a null reference (Nothing in Visual Basic).
SerializationException A value has already been associated with name.

Remarks

Trying to add the same name twice into the SerializationInfo is an error. The names are compared using an ordinal comparison, so it is possible, but not advisable, to have two names that differ only by case.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SerializationInfo Class | SerializationInfo Members | System.Runtime.Serialization Namespace | SerializationInfo.AddValue Overload List

Show:
© 2015 Microsoft