Bsp: Generische Methode in C#

class C {
   static T id<T> (T x) { return x; }
}

string foo = C.id<string> ("foo");
int    bar = C.id<int>    (42);



Johannes Waldmann 2013-01-28