Click or drag to resize
StreamExtensionsOpenRead Method
Opens the given stream for reading with a StreamReader.

Namespace: Bio.Extensions
Assembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax
public static StreamReader OpenRead(
	this Stream stream,
	Encoding encoding = null,
	bool detectEncodingFromByteOrderMarks = true,
	int bufferSize = 1024,
	bool leaveOpen = true
)

Parameters

stream
Type: System.IOStream
Stream
encoding (Optional)
Type: System.TextEncoding
Encoding, defaults to UTF8
detectEncodingFromByteOrderMarks (Optional)
Type: SystemBoolean

[Missing <param name="detectEncodingFromByteOrderMarks"/> documentation for "M:Bio.Extensions.StreamExtensions.OpenRead(System.IO.Stream,System.Text.Encoding,System.Boolean,System.Int32,System.Boolean)"]

bufferSize (Optional)
Type: SystemInt32
Buffer size, defaults to 1k
leaveOpen (Optional)
Type: SystemBoolean
True to keep underlying stream open on disposal.

Return Value

Type: StreamReader
StreamReader

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also