Sandeep Kumar
What is generic type ?
By Sandeep Kumar in .NET on Dec 27 2015
  • Bilal Ansari
    Oct, 2016 8

    It reduce the code repetition ...............

    • 1
  • Bilal Ansari
    Oct, 2016 8

    It reduce the code repetition ...............

    • 0
  • Amit Kumawat
    Sep, 2016 21

    Generic mean generalization of code, Writing generic code to reduce repetition of code.

    • 0
  • Bhuvanesh Mohankumar
    May, 2016 30

    To reduce the code repetition, generics is introduced where which has tendency to deal with any type of datatype which was defined during run-time.

    • 0
  • Kml Surani
    Jan, 2016 9

    Generics were added to version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code. For example, by using a generic type parameter T you can write a single class that other client code can use without incurring the cost or risk of runtime casts or boxing operations public class GenericList { void Add(T input) { } } class TestGenericList { private class ExampleClass { } static void Main() { // Declare a list of type int. GenericList list1 = new GenericList(); // Declare a list of type string. GenericList list2 = new GenericList(); // Declare a list of type ExampleClass. GenericList list3 = new GenericList(); } }

    • 0
  • Praveen Dhatrika
    Dec, 2015 30

    Generics were added to version 2.0 of the C# language and the common language runtime (CLR). Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code. For example, by using a generic type parameter T you can write a single class that other client code can use without incurring the cost or risk of runtime casts or boxing operationspublic class GenericList {void Add(T input) { } } class TestGenericList {private class ExampleClass { }static void Main(){// Declare a list of type int.GenericList list1 = new GenericList();// Declare a list of type string.GenericList list2 = new GenericList();// Declare a list of type ExampleClass.GenericList list3 = new GenericList();} }

    • 0
  • Sandeep Kumar
    Dec, 2015 27

    Generic type use to seprate the data type or it use to make collection as strong type.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS