Writes a string and the specified terminating byte.
Namespace: SharpAssembler.CoreAssembly: 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, byte terminator ) |
Visual Basic |
---|
<ExtensionAttribute> _ Public Shared Function WriteEncodedString ( _ writer As BinaryWriter, _ value As String, _ encoding As Encoding, _ terminator As Byte _ ) As Integer |
Visual C++ |
---|
[ExtensionAttribute] public: static int WriteEncodedString( BinaryWriter^ writer, String^ value, Encoding^ encoding, unsigned char terminator ) |
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 decode the string.
- terminator
- Type: System..::..Byte
The terminating byte.
Return Value
[Missing <returns> documentation for "M:SharpAssembler.Core.BinaryWriterExtensions.WriteEncodedString(System.IO.BinaryWriter,System.String,System.Text.Encoding,System.Byte)"]
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
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | writer == null |
System..::..ArgumentNullException | value == null |
System..::..ArgumentNullException | encoding == null |
Contracts
Requires | ||
---|---|---|
writer != null
| ||
value != null
| ||
encoding != null
|
Ensures |
---|
Contract.Result<int>() >= 0 |