public void RemoveTest() { subjectAltName target = new subjectAltName(testData1); OSCAGeneralName Name = testData2; target.Remove(Name); Assert.AreEqual(1, target.SubjAltNames.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); san.Remove(san.SubjAltNames[index - 1]); ds.Tables["generalNames"].Clear(); // Reload the dataset for (int i = 0; i < san.SubjAltNames.Count; i++) { updateDataSet(san.SubjAltNames[i], i); } }