[This is preliminary documentation and is subject to change.]
Serializes an Object.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static void Serialize<T>( ref Stream serializedOutput, T serializableObject, SerializationFormat serializationFormat )
Public Shared Sub Serialize(Of T) ( _ ByRef serializedOutput As Stream, _ serializableObject As T, _ serializationFormat As SerializationFormat _ )
public: generic<typename T> static void Serialize( Stream^% serializedOutput, T serializableObject, SerializationFormat serializationFormat )
Generic Template Parameters
- T
- Type of the serializableObject.
Parameters
- serializableObject (T)
- Object to be serialized.
- serializationFormat (SerializationFormat)
- SerializationFormat in which the serializableObject is to be serialized.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException |
serializedOutput or serializableObject is null. |
NotSupportedException | Specified serializationFormat is not supported. |