Encoder.Convert Method (Char*, Int32, Byte*, Int32, Boolean, Int32%, Int32%, Boolean%)
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)
[SECURITY CRITICAL]
This API is not CLS-compliant. The CLS-compliant alternative is Convert(Char(), Int32, Int32, Byte(), Int32, Int32, Boolean, Int32, Int32, Boolean).
Namespace:
System.Text[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Converts a buffer of Unicode characters to an encoded byte sequence and stores the result in another buffer.
Assembly: mscorlib (in mscorlib.dll)
'Declaration <SecurityCriticalAttribute> _ <CLSCompliantAttribute(False)> _ Public Overridable Sub Convert ( _ chars As Char*, _ charCount As Integer, _ bytes As Byte*, _ byteCount As Integer, _ flush As Boolean, _ <OutAttribute> ByRef charsUsed As Integer, _ <OutAttribute> ByRef bytesUsed As Integer, _ <OutAttribute> ByRef completed As Boolean _ )
Parameters
- chars
- Type:
System.Char
*
The address of a string of UTF-16 encoded characters to convert.
- charCount
- Type: System.Int32
The number of characters in chars to convert.
- bytes
- Type:
System.Byte
*
The address of a buffer to store the converted bytes.
- byteCount
- Type: System.Int32
The maximum number of bytes in bytes to use in the conversion.
- flush
- Type: System.Boolean
true to indicate no further data is to be converted; otherwise, false.
- charsUsed
- Type:
System.Int32
%
When this method returns, contains the number of characters from chars that were used in the conversion. This parameter is passed uninitialized.
- bytesUsed
- Type:
System.Int32
%
When this method returns, contains the number of bytes that were used in the conversion. This parameter is passed uninitialized.
- completed
- Type:
System.Boolean
%
When this method returns, contains true if all the characters specified by charCount were converted; otherwise, false. This parameter is passed uninitialized.
Show: