// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Data; using System.IO; using System.Xml; namespace E { public class MainClass { public static void Main(string[] args) { string xml = @" "; DataSet ds = new DataSet(); ds.ReadXml(new StringReader(xml)); Console.WriteLine(ds.Tables[0].Rows.Count); DataRow[] rows = ds.Tables[0].Select("id=1"); foreach (DataRow row in rows) { row.Delete(); } Console.WriteLine(ds.Tables[0].Rows.Count); } } }