Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
When overridden in a derived class, encodes a set of characters from the specified string into the specified byte array.
Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overridable Function GetBytes ( _
s As String, _
charIndex As Integer, _
charCount As Integer, _
bytes As Byte(), _
byteIndex As Integer _
) As Integer
public virtual int GetBytes(
string s,
int charIndex,
int charCount,
byte[] bytes,
int byteIndex
)
public:
virtual int GetBytes(
String^ s,
int charIndex,
int charCount,
array<unsigned char>^ bytes,
int byteIndex
)
abstract GetBytes :
s:string *
charIndex:int *
charCount:int *
bytes:byte[] *
byteIndex:int -> int
override GetBytes :
s:string *
charIndex:int *
charCount:int *
bytes:byte[] *
byteIndex:int -> int
public function GetBytes(
s : String,
charIndex : int,
charCount : int,
bytes : byte[],
byteIndex : int
) : int
Parameters
- s
Type: System. . :: . .String
The string containing the set of characters to encode.
- charIndex
Type: System. . :: . .Int32
The index of the first character to encode.
- charCount
Type: System. . :: . .Int32
The number of characters to encode.
- bytes
Type: array<System. . :: . .Byte> [] () [] []
The byte array to contain the resulting sequence of bytes.
- byteIndex
Type: System. . :: . .Int32
The index at which to start writing the resulting sequence of bytes.
Return Value
Type: System. . :: . .Int32
The actual number of bytes written into bytes.
Remarks
If the data to be converted is available only in sequential blocks (such as data read from a stream) or if the amount of data is so large that it needs to be divided into smaller blocks, the application should use the Decoder or the Encoder provided by the GetDecoder method or the GetEncoder method, respectively, of a derived class.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.