Write Method Write(T) Writes an object. Declaration byte[] Write(T obj) Parameters T obj The object. Returns byte[] The serialized object.