Method Serialize
Serialize<T>(TextWriter, T)
Serializes object to the specified TextWriter.
public static void Serialize<T>(TextWriter writer, T obj)
Parameters
writer
TextWriterTextWriter object.
obj
TObject to serialize.
Type Parameters
T
Type of the serialized object.
Serialize<T>(string, T)
Serializes object to the specified file without throwing exceptions.
public static bool Serialize<T>(string filename, T obj)
Parameters
filename
stringPath to file.
obj
TObject to serialize.
Returns
Type Parameters
T
Type of the serialized object.