What are Generics?
Answers were Sorted based on User's Feedback
Answer / rt
Generics was a new addition in .NET 2.0
With generics we can create reusable classes. It promotes code reusability.
With generics we create classes with placeholders(<T>), and while creating object of that class we declare a value for that placeholder(int,double,etc) and from then on that object is bind to that type.
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / kumar vaibhav
Generics is a data structure which allow you to create type-safe data structures without committing to actual data types. Generics provides significant performance boost and higher quality code by reusing data processing algorithms without duplicating type-specific code.
Is This Answer Correct ? | 5 Yes | 1 No |
generics in dot net have two concept boxing and unboxing
boxing ... we can convert value type into reference type
unboxing... it is very unexplict operation
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / rama krishna
Generics are place holders for actuval types.
Generics are defenied with left and right angular brackets.
Generics allows you to define type safe data sturtures
without comiting to actual types.
Generics in .net let you reuse the code and effort you put
implemnting in it.once you develop,test and deploy ur
application it can be used with any data type with future
type also it will support.why bcoz Generics doen't force
boxing or unboxing for value types or downcasting the
refernce types.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / rajnesh
generic === generic is a Namespace just collection of
arrays & arraylist .
which are use in c#
using system .collection.Generic;
Is This Answer Correct ? | 1 Yes | 2 No |
Explain Constructor and destructor?
Differentiate between response.expires and response.expiresabsolute?
What is Interface? Explain with an example.
What does clr stand for?
I am using a data table and a datagridview. I am creating two columns in data grid view : 1)DataGridViewComboBoxColumn 2)DataGridViewTextBoxColumn. The items of datagridviewcombo are the list of all items in data table column 1. I want that the data type of the DataGridViewTextBoxColumn should be the same as the data type of the item selected from the datagridviewcombo at runtime. How can I do that.Also I want that each cell in column of datatable should be of variable data type. Pls help. thnx.
What is the components of window?
i am using windows authentication for c#.net remoting with iis.I uncheck the anonymous access option in directory security.when my client requests the server it returns 401:unauthorized error.How can I resolve the exception ? Please send me the reply as early as possible.
What is view state c#?
Is string nullable c#?
What is a c# delegate?
Distinguish between a class and struct?
Is c# slower than java?