using System.Collections.Generic;
public static void Main()
var tests = new List<Test>
new Test {Name = "George"},
new Test {Name = "Harry"}
var result = tests.Select((x, index) => {x.Id = index; return x;});
foreach (var test in result)
Console.WriteLine(test.Id + ": " + test.Name);
public string Name {get;set;}