Skip to content

Instantly share code, notes, and snippets.

@ElectricCoffee
Created January 21, 2015 23:20
Show Gist options
  • Save ElectricCoffee/97cfac75ba3227ffc304 to your computer and use it in GitHub Desktop.
Save ElectricCoffee/97cfac75ba3227ffc304 to your computer and use it in GitHub Desktop.
make-shift Tuple class for .NET 3.5 which doesn't include it
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Utilities
{
static class Pair
{
public static Pair<T1, T2> Make<T1, T2>(T1 fst, T2 snd)
{
return new Pair<T1, T2> { First = fst, Second = snd };
}
}
class Pair<T1, T2>
{
public T1 First { get; set; }
public T2 Second { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment