Recently ive been teaching some new developers on the team about generics, its not a new concept i know, and when you know about them you cant quite figure how people sometimes just dont know about them, they are so helpfull. So tell me about them then! Generics came in at .net 2.0 and are used extensively through out the .net framework internally, if you do much .net dev work you will come across then at some point. What are generics Generics allow you to define a type (class or structure) while leaving some of the details unspecified. Quick Tip When you see the following in code you know you are looking at code that uses generics //C# List myArray = new List (); List my2ndArray = new List (); 'VB.Net Dim myArray As New List(Of integer)(); Dim my2ndArray As New List(Of myClass)(); The main benefits for using generics are: Type safety (you can only put ints in a collection of ints for example) Performance (boxing and unboxing of primitive types is eliminated) Clarity ...
Awaz Apni Baat Apni is started in new Vision of Pakistan, We want to see a real image of Pakistan in public Point of View, Our Pakistan with New Vision.

