Код | static void Main(string[] args) { var table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("FAM", typeof(string)); table.Columns.Add("NAM", typeof(string));
table.Rows.Add(1, "Петров", "Иван"); table.Rows.Add(2, "Иванов", "Сергей"); table.Rows.Add(3, "Сидоров", "Максим"); table.Rows.Add(4, "Павлов", "Алексей");
var arr = new[] { "Петров", "Егоров", "Алексеев", "Павлов", "Макаров" };
var result = table.AsEnumerable().Where(r => !arr.Contains(r.Field<string>("FAM"))); }
|
|