Exemplo n.º 1
0
 /// <summary>Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.</summary>
 /// <returns>The number of characters produced by decoding the specified sequence of bytes.</returns>
 /// <param name="bytes">The byte array containing the sequence of bytes to decode. </param>
 /// <param name="index">The index of the first byte to decode. </param>
 /// <param name="count">The number of bytes to decode. </param>
 /// <exception cref="T:System.ArgumentNullException">
 ///   <paramref name="bytes" /> is null (Nothing). </exception>
 /// <exception cref="T:System.ArgumentOutOfRangeException">
 ///   <paramref name="index" /> or <paramref name="count" /> is less than zero.-or- <paramref name="index" /> and <paramref name="count" /> do not denote a valid range in <paramref name="bytes" />.-or- The resulting number of characters is greater than the maximum number that can be returned as an int. </exception>
 /// <exception cref="T:System.Text.DecoderFallbackException">A fallback occurred (see Understanding Encodings for complete explanation)-and-<see cref="P:System.Text.Encoding.DecoderFallback" /> is set to <see cref="T:System.Text.DecoderExceptionFallback" />.</exception>
 /// <filterpriority>1</filterpriority>
 public override int GetCharCount(byte[] bytes, int index, int count)
 {
     return(UTF7Encoding.InternalGetCharCount(bytes, index, count, 0));
 }