Writes the specified string encoded as bytes with no terminating byte.

Namespace: SharpAssembler.Core
Assembly: SharpAssembler Core (in SharpAssembler Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static int WriteEncodedString(
	this BinaryWriter writer,
	string value,
	Encoding encoding
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function WriteEncodedString ( _
	writer As BinaryWriter, _
	value As String, _
	encoding As Encoding _
) As Integer
Visual C++
[ExtensionAttribute]
public:
static int WriteEncodedString(
	BinaryWriter^ writer, 
	String^ value, 
	Encoding^ encoding
)

Parameters

writer
Type: System.IO..::..BinaryWriter
The BinaryWriter being used.
value
Type: System..::..String
The value to write.
encoding
Type: System.Text..::..Encoding
The Encoding used to encode the string.

Return Value

The number of bytes written.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type BinaryWriter. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

Exceptions

Contracts

Requires
writer != null
value != null
encoding != null
Ensures
Contract.Result<int>() >= 0

See Also