Serializes output into a stream that you pass in. You provide the stream and this method writes the data to it.
public static bool SerializeToStream(object value,
Stream stream,
bool binary,
bool throwExceptions);
Parameters
valuestream
binary
throwExceptions
See also:
Class DataContractSerializationUtils