A prototypical generic method : Generic Method « Generics « C# / C Sharp
- C# / C Sharp
- Generics
- Generic Method
A prototypical generic method

using System;
public class Starter{
public static void Main(){
MethodA<int>(20);
}
public static void MethodA<T>(T param) {
Console.WriteLine(param.GetType().ToString());
}
}
Related examples in the same category