MailKit.Net.Imap.ImapStream.ValidateArguments C# (CSharp) Method

ValidateArguments() static private method

static private ValidateArguments ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void
		static void ValidateArguments (byte[] buffer, int offset, int count)
		{
			if (buffer == null)
				throw new ArgumentNullException (nameof (buffer));

			if (offset < 0 || offset > buffer.Length)
				throw new ArgumentOutOfRangeException (nameof (offset));

			if (count < 0 || count > (buffer.Length - offset))
				throw new ArgumentOutOfRangeException (nameof (count));
		}