Writes the text representation of an object to the text stream.
[Visual Basic] Overloads Overridable Public Sub Write( _ ByVal value As Object _ ) [C#] public virtual void Write( object value ); [C++] public: virtual void Write( Object* value ); [JScript] public function Write( value : Object );
Exception Type | Condition |
---|---|
ArgumentNullException | A a null reference (in Visual Basic Nothing) string or object is passed. |
IOException | An I/O error occurs. |
If the specified object is null, the string "null" is written to the text stream. Otherwise, the object's ToString method is called to produce the string representation, and the resulting string is then written to the output stream.
TextWriter Class | TextWriter Members | System.IO Namespace | TextWriter.Write Overload List