Writes a number or a String to an output device or file.
steamwriter_object.Write( number )
-or-
steamwriter_object.Write( string_value )
Prerequisites
Open the output stream using a New to create the streamwriter_object.
Parameters
number
A numeric value that is converted to a String and written.
string_value
A String expression this is written. Each byte of the String may be an arbitrary 8-bit value.
Remarks
This method writes String data to an output device or file. If a number is passed as the argument, it is first converted to an ASCII String value and then output. Buffering of data is determined by the setting of the AutoFlush property. When output is actually performed, this method blocks until it is complete. If any I/O error occurs, this method throws an Exception.
Examples
Dim tfile As New StreamWriter("/ROMDISK/test.tmp")
tfile.Write("Test ") ' Writes "Test "
tfile.Write(3.14) ' Writes "3.14" on the same line as "Test "
See Also