System.Xml.SafeAsciiDecoder.Convert C# (CSharp) Méthode

Convert() public méthode

public Convert ( byte bytes, int byteIndex, int byteCount, char chars, int charIndex, int charCount, bool flush, int &bytesUsed, int &charsUsed, bool &completed ) : void
bytes byte
byteIndex int
byteCount int
chars char
charIndex int
charCount int
flush bool
bytesUsed int
charsUsed int
completed bool
Résultat void
        public override void Convert( byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed ) {
            if ( charCount < byteCount ) {
                byteCount = charCount;
                completed = false;
            }
            else {
                completed = true;
            }

            int i = byteIndex;
            int j = charIndex;
            int byteEndIndex = byteIndex + byteCount;

            while ( i < byteEndIndex ) {
                chars[j++] = (char)bytes[i++];
            }

            charsUsed = byteCount;
            bytesUsed = byteCount;
        }
    }