You can group by several properties using an anonymous type:
var result = list1.GroupBy(x=> new {x.ID, x.VERSION}).Select( item => new Example { ID = item.Key.ID, VERSION = item.Key.VERSION, ENTITY = string.Join("/", item.Select(c=>c.ENTITY)) });
Then select the appropriate properties and load them into a new object of the type you need.
Output:

EDIT:
In a DataTable you need to access the columns using the [ ] operator, but the principle of grouping remains the same:
Examination data table:
DataTable table = new DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("VERSION", typeof(string)); table.Columns.Add("ENTITY", typeof(string)); table.Rows.Add(1, "01", "A01"); table.Rows.Add(1, "01", "A02"); table.Rows.Add(2, "01", "A01"); table.Rows.Add(2, "01", "A02");
Grouping:
var result = table.AsEnumerable().GroupBy(x => new { ID = x["ID"], VERSION = x["VERSION"]}).Select( item => new Example { ID = (int)item.Key.ID, VERSION = (string)item.Key.VERSION, ENTITY = string.Join("/", item.Select(c => c["ENTITY"])) });
source share