Maha

Maha

  • NA
  • 0
  • 170.4k

NP53 Generic

Oct 14 2007 2:18 PM

Hi Guys

 

NP53       Generic

 

I wish to know whether Generic is still used in C# or with the updated versions in C# Generic has become outdated. Because rarely I see Generic in C# programs. Anyone knows please tell.

 

Thank you

 

// Examples of various places where generics can be defined:

                   

                    // Generic Class:

                    public class MyGenericClass<T> {}

 

                    // Generic Method:

                    public void MyGenericMethod<T>(T type) {}

 

                    // Generic Interface:

                    public interface MyGenericInterface<T> {}

 

                    // Generic Delegate:

                  public delegate void MyGenericDelegate<T>(T type);


Answers (2)