UTF8Encoding.GetBytes Method (Char*, Int32, Byte*, Int32)
For apps that target Windows Phone OS 7.0 and 7.1, do not use this member in your app. If you do, your code will throw a MethodAccessException. This member is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
Assembly: mscorlib (in mscorlib.dll)
The actual number of bytes written at the location indicated by bytes.
[SECURITY CRITICAL]
This API is not CLS-compliant.
Namespace:
System.Text[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
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.
Assembly: mscorlib (in mscorlib.dll)
'Declaration <SecurityCriticalAttribute> _ <CLSCompliantAttribute(False)> _ Public Overrides Function GetBytes ( _ chars As Char*, _ charCount As Integer, _ bytes As Byte*, _ byteCount As Integer _ ) As Integer
Parameters
- chars
- Type:
System.Char
*
A pointer to the first character to encode.
- charCount
- Type: System.Int32
The number of characters to encode.
- bytes
- Type:
System.Byte
*
A pointer to the location at which to start writing the resulting sequence of bytes.
- byteCount
- Type: System.Int32
The maximum number of bytes to write.
Return Value
Type: System.Int32The actual number of bytes written at the location indicated by bytes.
Show: