Results 1 to 4 of 4

Thread: Non Generic type v/s Generic type

  1. #1
    Join Date
    Jan 2011
    Posts
    15

    Non Generic type v/s Generic type

    I am a developer by profession , as a developer in the sense I am a web developer and I just develop static websites, but since a few days I am feeling very eager to learn the application development and its concepts , so for that purpose I started learning the .NET languages in the Microsoft’s Visual Studio , , can anyone tell me that what is the actual difference between a generic type and non generic type that were being used in the Visual C#.

  2. #2
    Join Date
    May 2009
    Posts
    527

    Re: Non Generic type v/s Generic type

    Making the use of the objects that derive from interfaces does not need casting time and time again. One cause to derive from interfaces is to make use of polymorphism. One universal code pattern that I am doing is people make use of generic objects with non-generic methods and classes. That generally happens when you run into all of those casting issues that you are actually referring to. I recommend that you make use of generic methods with generic object parameters.

  3. #3
    Join Date
    Apr 2009
    Posts
    569

    Re: Non Generic type v/s Generic type

    As for code re-use, can I suppose that you mean methods? I regularly use delegates in DLLs to access the methods controlled inside. I make use of generics to define classes contained within the DLLs. Code re-use arrives in more than flavor. One flavor is a DLL library same as the .NET Framework, that is loaded with generics classes and classes that implement a variety of interfaces.

  4. #4
    Join Date
    Nov 2008
    Posts
    1,001

    Re: Non Generic type v/s Generic type

    One more flavor is generating layers within your program that make use of most all of the objects inside your application. There is no purpose of exporting the code to a DLL library. It is develped to be re-used within the application, not exterior to it. tHis all flavors are not there in nongeneric. A generic type is a reference type that contains one or more type parameters. These type parameters are afterwards replaced by type arguments at what time the generic type is declared

Similar Threads

  1. Value type V/s Reference Type in C #
    By Solaris in forum Software Development
    Replies: 4
    Last Post: 28-01-2011, 02:41 AM
  2. Replies: 4
    Last Post: 02-01-2011, 12:25 AM
  3. Replies: 1
    Last Post: 16-08-2010, 05:25 PM
  4. Replies: 1
    Last Post: 16-08-2010, 04:44 PM
  5. What is Generic PUP.x
    By AK_Chopra in forum Networking & Security
    Replies: 2
    Last Post: 15-05-2009, 12:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,723,907.09580 seconds with 17 queries