public void Update(byte[] buffer) { if ( buffer == null ) { throw new ArgumentNullException("buffer"); //判断参数为空,抛出异常,而非try catch捕获 }
Update(buffer, 0, buffer.Length); }