public void RemoveTest() { crlDistPoint target = new crlDistPoint(testInputXml); OSCAGeneralName Name = testInputGeneralName1; target.Remove(Name); Assert.AreEqual(1, target.DistPoints.Count); }
private void butRemove_Click(object sender, EventArgs e) { // Easiest to reload the dataset, rather than fiddling around removing int index = Convert.ToInt32((string)dgv.SelectedRows[0].Cells[0].Value); crlDP.Remove(crlDP.DistPoints[index - 1]); ds.Tables["generalNames"].Clear(); // Reload the dataset for (int i = 0; i < crlDP.DistPoints.Count; i++) { updateDataSet(crlDP.DistPoints[i], i); } }