using System.Collections.Generic;
public static void Print(List<Artifact> list)
Console.WriteLine(a.Id+" "+a.Type+" "+a.F);
public static void Main()
List<Artifact> artifacts = new List<Artifact>();
Artifact a1 = new Artifact{Id = 1, Type = "a", F = "koko"};
Artifact a2 = new Artifact{Id = 1, Type = "a", F = "dup"};
Artifact a3 = new Artifact{Id = 1, Type = "b", F = "koko"};
Artifact a4 = new Artifact{Id = 2, Type = "b", F = "koko"};
Artifact a5 = new Artifact{Id = 2, Type = "b", F = "dup"};
Artifact a6 = new Artifact{Id = 3, Type = "c", F = "koko"};
Print(artifacts.GroupBy(artifact => new { artifact.Id, artifact.Type}).Select(g => g.First()).ToList());
Console.WriteLine("========================================");
Print(artifacts.GroupBy(artifact => new { artifact.Id, artifact.Type}).Where(gr => gr.Count() > 1).Select(g => g.ElementAt(1)).ToList());
public int Id { get; set; }
public string Type { get; set; }
public string F {get; set;}