コード例 #1
0
 public override unsafe int GetBytes(char *chars, int charCount, byte *bytes, int byteCount)
 {
     return(EncodingForwarder.GetBytes(this, chars, charCount, bytes, byteCount));
 }
コード例 #2
0
        // Encodes a range of characters in a character array into a range of bytes
        // in a byte array. An exception occurs if the byte array is not large
        // enough to hold the complete encoding of the characters. The
        // GetByteCount method can be used to determine the exact number of
        // bytes that will be produced for a given range of characters.
        // Alternatively, the GetMaxByteCount method can be used to
        // determine the maximum number of bytes that will be produced for a given
        // number of characters, regardless of the actual character values.

        public override int GetBytes(char[] chars, int charIndex, int charCount,
                                     byte[] bytes, int byteIndex)
        {
            return(EncodingForwarder.GetBytes(this, chars, charIndex, charCount, bytes, byteIndex));
        }