[This is preliminary documentation and is subject to change.]
Serializes an Object.

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 )

- T
- Type of the serializableObject.

- serializableObject (T)
- Object to be serialized.
- serializationFormat (SerializationFormat)
- SerializationFormat in which the serializableObject is to be serialized.

Exception | Condition |
---|---|
ArgumentNullException |
serializedOutput or serializableObject is null. |
NotSupportedException | Specified serializationFormat is not supported. |