Click or drag to resize
StreamExtensionsOpenWrite Method
Opens the given stream for writing with a StreamWriter.

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

Parameters

stream
Type: System.IOStream
Stream
encoding (Optional)
Type: System.TextEncoding
Encoding, defaults to UTF8
bufferSize (Optional)
Type: SystemInt32
Buffer size, defaults to 1k
leaveOpen (Optional)
Type: SystemBoolean
True to keep underlying stream open on disposal.

Return Value

Type: StreamWriter
StreamWriter

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