Skip to content

Instantly share code, notes, and snippets.

@jonpryor
Created June 28, 2019 21:26
Show Gist options
  • Save jonpryor/c0c2e759217524c9b025ab5ca7500329 to your computer and use it in GitHub Desktop.
Save jonpryor/c0c2e759217524c9b025ab5ca7500329 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
var markers = new[]{
(a: 1, s: "a"),
(a: 2, s: "b"),
(a: 3, s: "c"),
};
var x = markers.FirstOrDefault(((int a, string s) v) => v.a == 1);
Console.WriteLine(x);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment