using System.Collections.Generic;
public string teststring { get; set; }
public string account { get; set; }
public bool boolfield { get; set;}
public override string ToString()
return teststring + " " + account + " " +boolfield.ToString();
public static void Main()
List<test> ll = new List<test>();
teststring = "should be false",
teststring = "should be false",
teststring = "should be true",
teststring = "fuckyouwwľ",
var testsss = ll.GroupBy(x=> x.teststring).Where(g => g.Count() > 1).Select(g => new{ g.Key, boolfield = g.All(m => m.boolfield)}).ToList();
foreach (var item in testsss)
Console.WriteLine(item.ToString());
Console.WriteLine("Hello World");