System.Text.UnicodeEncoding.UnicodeDecoder.GetCharCount C# (CSharp) Method

GetCharCount() public method

public GetCharCount ( byte bytes, int index, int count ) : int
bytes byte
index int
count int
return int
		public override int GetCharCount (byte[] bytes, int index, int count)
		{
			if (bytes == null) {
				throw new ArgumentNullException ("bytes");
			}
			if (index < 0 || index > bytes.Length) {
				throw new ArgumentOutOfRangeException ("index", _("ArgRange_Array"));
			}
			if (count < 0 || count > (bytes.Length - index)) {
				throw new ArgumentOutOfRangeException ("count", _("ArgRange_Array"));
			}
			if (leftOverByte != -1) {
				return (count + 1) / 2;
			} else {
				return count / 2;
			}
		}
		
UnicodeEncoding.UnicodeDecoder