using System.Collections.Generic;
public string Name { get; set; }
public int Age { get; set; }
public void Deconstruct(out string name, out int age) {
public override string ToString() {
return $"Name={this.Name}, Age={this.Age}";
static List<Person> people = new List<Person>
new Person { Name = "Bob", Age = 37 },
new Person { Name = "Brian", Age = 21 },
new Person { Name = "Amy", Age = 58 }
public static void Main()
var bob = people.SingleOrDefault(((Name, _)) => Name == "Bob");