All pastes #254322 Raw Edit

Stuff

public text v1 · immutable
#254322 ·published 2006-11-21 19:16 UTC
rendered paste body
public StreamReader(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize)
{
      if ((path == null) || (encoding == null))
      {
            throw new ArgumentNullException((path == null) ? "path" : "encoding");
      }
      if (path.Length == 0)
      {
            throw new ArgumentException(Environment.GetResourceString("Argument_EmptyPath"));
      }
      if (bufferSize <= 0)
      {
            throw new ArgumentOutOfRangeException("bufferSize", Environment.GetResourceString("ArgumentOutOfRange_NeedPosNum"));
      }
      Stream stream1 = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 0x1000, FileOptions.SequentialScan);
      this.Init(stream1, encoding, detectEncodingFromByteOrderMarks, bufferSize);
}