-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tuple.cs
34 lines (30 loc) · 855 Bytes
/
Tuple.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
namespace DrRobot.JaguarControl
{
public class Tuple<T1, T2>
{
public T1 First { get; private set; }
public T2 Second { get; private set; }
internal Tuple(T1 first, T2 second)
{
First = first;
Second = second;
}
}
public static class Tuple
{
public static Tuple<T1, T2> New<T1, T2>(T1 first, T2 second)
{
var tuple = new Tuple<T1, T2>(first, second);
return tuple;
}
// Copy Constructor
public static Tuple<T1, T2 > newTuple<T1,T2> (Tuple <T1, T2> origTuple)
{
T1 tempFirst = origTuple.First;
T2 tempSecond = origTuple.Second;
var tuple = new Tuple<T1, T2>(tempFirst, tempSecond);
return tuple;
}
}
}