using System.Collections.Generic;
public string teststring { get; set; }
public string account { get; set; }
public int boolfield { get; set;}
public override string ToString()
return teststring + " " + account + " " +boolfield.ToString();
public static void Main()
List<test> ll = new List<test>();
var testsss = ll.GroupBy(x=> x.teststring).Select(g => new{ g.Key, boolfield = g.Min(m => m.boolfield)}).ToList();
foreach (var item in testsss)
Console.WriteLine(item.ToString());
Console.WriteLine("Hello World");