c# get all id of list object code example Example: c# get all id of list object Categories.Select(c => c.Id).ToList();