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 _
public void AddValue(
 string name,
 char value
public: void AddValue(
 String* name,
 __wchar_t value
public function AddValue(
   name : String,
 value : Char


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


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


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.


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

© 2015 Microsoft