public void TestDeleteClosed() { Assert.Throws<IndexOutOfRangeException>(() => { DataView TestView = new DataView(_dataTable); TestView.Dispose(); // Close the table TestView.Delete(0); // cannot access to item at 0. }); }