コード例 #1
0
 /// <summary>Calculates the number of bytes produced by encoding a set of characters from the specified character array.</summary>
 /// <returns>The number of bytes produced by encoding the specified characters.</returns>
 /// <param name="chars">The character array containing the set of characters to encode. </param>
 /// <param name="index">The index of the first character to encode. </param>
 /// <param name="count">The number of characters to encode. </param>
 /// <exception cref="T:System.ArgumentNullException">
 ///   <paramref name="chars" /> 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="chars" />.-or- The resulting number of bytes is greater than the maximum number that can be returned as an int. </exception>
 /// <exception cref="T:System.Text.EncoderFallbackException">A fallback occurred (see Understanding Encodings for complete explanation)-and-<see cref="P:System.Text.Encoding.EncoderFallback" /> is set to <see cref="T:System.Text.EncoderExceptionFallback" />.</exception>
 /// <filterpriority>1</filterpriority>
 public override int GetByteCount(char[] chars, int index, int count)
 {
     return(UTF7Encoding.InternalGetByteCount(chars, index, count, true, 0, false, this.allowOptionals));
 }
コード例 #2
0
 public override int GetByteCount(char[] chars, int index, int count, bool flush)
 {
     return(UTF7Encoding.InternalGetByteCount(chars, index, count, flush, this.leftOver, this.isInShifted, this.allowOptionals));
 }