What are Generics? Where do we use them.

Answer Posted / rakesh kumar kunchala

Generics are used to have Typed Arrays.

Ex: if we have define that an array is confined to products.
if we push objects of product into array it accepts.
if we push employee objects into this array it will show
error . since the type of the array is product.

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between abstract class and interface in .net?

555


How boxing and unboxing occures in memory?

609


Explain me what is the difference between a class and an object, and how do these terms relate to each other?

503


What is the intermediate language between asp and asp.net1.0?

1464


What is typical about a windows process in regards to memory allocation in dot net?

563






Explain how to load the contents of an xml file into an xmldocument object?

548


How to view a .NET assembly?

600


Using activex control in .net?

554


Explain is the jit an interpreter?

564


Please explain what do the terms “boxing” and “unboxing” mean?

584


If you are executing these statements in commandobject. Select * from table1; select * from table2? How you will deal result set? 42. How do you sort a dataset.

540


Is .net core stable?

497


Explain about .Net products?

609


Explain what is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?

521


What is the use of gacutil.exe?

660