5 public static class Stuff
7 public static GenericStuff
<T1
, T2
> CreateThing
<T1
, T2
> (T1 firstValue
, T2 secondValue
)
9 return new GenericStuff
<T1
, T2
> (firstValue
, secondValue
);
13 public class GenericStuff
<T1
, T2
>
15 public readonly T1 FirstValue
;
16 public readonly T2 SecondValue
;
18 public GenericStuff (T1 firstValue
, T2 secondValue
)
20 FirstValue
= firstValue
;
21 SecondValue
= secondValue
;
25 public static class Program
27 public static void Main ()
29 var thing
= Stuff
.CreateThing (default (string), "abc");
30 Console
.WriteLine (thing
.FirstValue
);
31 Console
.WriteLine (thing
.SecondValue
);