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()); } }
1. | This is a prototypical generic method: | ||
2. | Demonstrate a generic method | ||
3. | Generic methods can overload nongeneric methods |