public void SetNull()
{
_lCurLen = x_lNull;
_stream = null;
_state = SqlBytesCharsState.Null;
AssertValid();
}
public void SqlBytesSetNull () { byte [] b1 = new byte [10]; SqlBytes bytes = new SqlBytes (b1); Assert.AreEqual (bytes.Length, 10, "#1 Should be same"); bytes.SetNull (); try { Assert.AreEqual (bytes.Length, 10, "#1 Should not be same"); Assert.Fail ("Should throw SqlNullValueException"); } catch (Exception ex) { Assert.AreEqual (typeof (SqlNullValueException), ex.GetType (), "Should throw SqlNullValueException"); } Assert.AreEqual (true, bytes.IsNull, "#2 Should be same"); }