System.IO.StreamWriter.StreamWriter C# (CSharp) Method

StreamWriter() public method

public StreamWriter ( string path, bool append, Encoding encoding, int bufferSize ) : System.Text
path string
append bool
encoding System.Text.Encoding
bufferSize int
return System.Text
        public StreamWriter(string path, bool append, Encoding encoding, int bufferSize)
        { 
            if (path == null)
                throw new ArgumentNullException(nameof(path));
            if (encoding == null)
                throw new ArgumentNullException(nameof(encoding));
            if (path.Length == 0)
                throw new ArgumentException(SR.Argument_EmptyPath);
            if (bufferSize <= 0)
                throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.ArgumentOutOfRange_NeedPosNum);

            Stream stream = FileStreamHelpers.CreateFileStream(path, write: true, append: append);
            Init(stream, encoding, bufferSize, shouldLeaveOpen: false);
        }

Same methods

StreamWriter::StreamWriter ( ) : System.Text
StreamWriter::StreamWriter ( Stream stream ) : System.Text
StreamWriter::StreamWriter ( Stream stream, Encoding encoding ) : System.Text
StreamWriter::StreamWriter ( Stream stream, Encoding encoding, int bufferSize ) : System.Text
StreamWriter::StreamWriter ( Stream stream, Encoding encoding, int bufferSize, bool leaveOpen ) : System.Text
StreamWriter::StreamWriter ( string path ) : System.Text
StreamWriter::StreamWriter ( string path, bool append ) : System.Text
StreamWriter::StreamWriter ( string path, bool append, Encoding encoding ) : System.Text