Generics of C#.Net Interview Questions(6)
1.What is Generics?
A) Generics are the most powerful feature of C#
2.0. Generics allow you to define type-safe data structures, without committing
to actual data types.
2.What are the
namespaces related to generics?
A)Following namespaces
are related to generics.They are:
Ø System.Collections.Generic
Ø System.Collections.ObjectModel
3.For which entities
generics can be implemented?
A)Generics can be
implemented with the following entities.They are:
Ø Classes
Ø Structures
Ø Interfaces
Ø Methods
Ø Events and
Ø Delegates
4.What is the use of
Generics?
A)Generics will maximize
code Reusability,Type Safety and Performance.
5.How data types will be
obtained in Generics?
A)Data Types used in
Generics can be obtained with the help of reflection at runtime.
6.What are the things
used for generics?
A)To work with
generics,we use two things:
Ø Place holder represented by <>
Ø Type Parameter
Ø Always type parameter should be enclosed within
the place holder,like <type parameter>
0 comments:
Post a Comment