Encoding.GetBytes Method (Char*, Int32, Byte*, Int32)
This member can be used only by trusted applications. If you try to use this member in a partial-trust application, your code will throw a MethodAccessException exception. This member is security-critical, which restricts its use.
When overridden in a derived class, encodes a set of characters starting at the specified character pointer into a sequence of bytes that are stored starting at the specified byte pointer.
This API is not CLS-compliant.
Assembly: mscorlib (in mscorlib.dll)
'Declaration <ComVisibleAttribute(False)> _ <SecurityCriticalAttribute> _ <CLSCompliantAttribute(False)> _ Public Overridable Function GetBytes ( _ chars As Char*, _ charCount As Integer, _ bytes As Byte*, _ byteCount As Integer _ ) As Integer
[ComVisibleAttribute(false)] [SecurityCriticalAttribute] [CLSCompliantAttribute(false)] public virtual int GetBytes( char* chars, int charCount, byte* bytes, int byteCount )
A pointer to the first character to encode.
The number of characters to encode.
A pointer to the location at which to start writing the resulting sequence of bytes.
The maximum number of bytes to write.
The actual number of bytes written at the location indicated by the bytes parameter.
Supported in: 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Supported in: Xbox 360, Windows Phone OS 7.0
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.