private void Generics2StringButon(object sender, EventArgs e) { MyGenericClass <string> strGenericClass = new MyGenericClass <string>("Hello Generic World"); strGenericClass.genericProperty = "This is a generic property example."; string result = strGenericClass.genericMethod("Generic Parameter"); }
//http://www.tutorialsteacher.com/csharp/csharp-generics private void Generics1IntButton(object sender, EventArgs e) { MyGenericClass <int> intGenericClass = new MyGenericClass <int>(10); int val = intGenericClass.genericMethod(200); }