Click or drag to resize
StreamWriter Class
Implements a TextWriter for writing characters to a stream in a particular encoding.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.IOTextWriter
      System.IOStreamWriter

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public class StreamWriter : TextWriter

The StreamWriter type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFlush
Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.
(Inherited from TextWriter.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWrite(Boolean)
Writes the text representation of a Boolean value to the text stream.
(Inherited from TextWriter.)
Public methodWrite(Char)
Writes a character to the text stream.
(Inherited from TextWriter.)
Public methodWrite(Char)
Writes a character array to the text stream.
(Inherited from TextWriter.)
Public methodWrite(Decimal)
Writes the text representation of a decimal value to the text stream.
(Inherited from TextWriter.)
Public methodWrite(Double)
Writes the text representation of an 8-byte floating-point value to the text stream.
(Inherited from TextWriter.)
Public methodWrite(Int32)
Writes the text representation of a 4-byte signed integer to the text stream.
(Inherited from TextWriter.)
Public methodWrite(Int64)
Writes the text representation of an 8-byte signed integer to the text stream.
(Inherited from TextWriter.)
Public methodWrite(Object)
Writes the text representation of an object to the text stream by calling ToString on that object.
(Inherited from TextWriter.)
Public methodWrite(Single)
Writes the text representation of a 4-byte floating-point value to the text stream.
(Inherited from TextWriter.)
Public methodWrite(String)
Writes a string to the text stream.
(Inherited from TextWriter.)
Public methodWrite(UInt32)
Writes the text representation of a 4-byte unsigned integer to the text stream.
(Inherited from TextWriter.)
Public methodWrite(UInt64)
Writes the text representation of an 8-byte unsigned integer to the text stream.
(Inherited from TextWriter.)
Public methodWrite(String, Object)
Writes out a formatted string, using the same semantics as Format(String, Object).
(Inherited from TextWriter.)
Public methodWrite(String, Object)
Writes out a formatted string, using the same semantics as Format(String, Object).
(Inherited from TextWriter.)
Public methodWrite(Char, Int32, Int32)
Writes a subarray of characters to the text stream.
(Inherited from TextWriter.)
Public methodWrite(String, Object, Object)
Writes out a formatted string, using the same semantics as Format(String, Object).
(Inherited from TextWriter.)
Public methodWrite(String, Object, Object, Object)
Writes out a formatted string, using the same semantics as Format(String, Object).
(Inherited from TextWriter.)
Top
Fields
  NameDescription
Protected fieldCoreNewLine
Stores the new line characters used for this TextWriter.
(Inherited from TextWriter.)
Public fieldStatic memberNull
Provides a StreamWriter with no backing store that can be written to, but not read from.
Top
See Also