Share via


Write Method (Object)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Writes the text representation of an object to the text string or stream by calling the ToString method on that object.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

Syntax

'Declaration
Public Overridable Sub Write ( _
    value As Object _
)
public virtual void Write(
    Object value
)
public:
virtual void Write(
    Object^ value
)
abstract Write : 
        value:Object -> unit 
override Write : 
        value:Object -> unit 
public function Write(
    value : Object
)

Parameters

Remarks

This overload is equivalent to the Write(String) overload.

If the specified object is null Nothing nullptr unit a null reference (Nothing in Visual Basic) , no action is taken and no exception is thrown. Otherwise, the object's ToString method is called to produce the string representation, and the resulting string is then written to the output stream. The FormatProvider property, if not null Nothing nullptr unit a null reference (Nothing in Visual Basic) , specifies the culture-specific formatting.

.NET Framework Security

See Also

Reference

TextWriter Class

Write Overload

System.IO Namespace