Example #1
0
 public void SetLengthTest()
 {
     using (var m = new SafeHGlobalHandle(1000))
         using (var ms = new MarshalingStream((IntPtr)m, m.Size))
         {
             Assert.That(() => ms.SetLength(1), Throws.Exception);
         }
 }
Example #2
0
 public void SetLengthTest()
 {
     using SafeHGlobalHandle m = new SafeHGlobalHandle(1000);
     using MarshalingStream ms = new MarshalingStream(m, m.Size);
     Assert.That(() => ms.SetLength(1), Throws.Exception);
 }