What is C#.NET Generics? where we can used in real time?

Posted by Bathala.ramesh430 under CSS 3 on 12/25/2010 | Points: 10 | Views : 84945 | Status : [Member] | Replies : 8
What is C#.NET Generics? where we can used in real time?

Thanks & Regards
Ramesh.B



Responses

Posted by: SheoNarayan on: 12/25/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hello Bathala,

Generics allows us to define the type-safe classes without worrying about type safely, performance and performance.

A very good link to read about generics is http://msdn.microsoft.com/en-us/library/ms379564(v=vs.80).aspx

However, you can visit http://www.dotnetfunda.com/interview/exam3644-what-is-csharpnet-generics.aspx and http://www.dotnetfunda.com/forums/thread804-generics.aspx as well.

Thanks!

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Bathala.ramesh430, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/6/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Same questions is posted here as well

http://www.dotnetfunda.com/forums/thread1595-when-i-use-generics-in-a-dot-net-real-time-project.aspx

Thanks
Karthik
www.f5Debug.net

Bathala.ramesh430, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Questpond on: 6/10/2011 [PanelMember] [Member] [Microsoft_MVP] [MVP] [Administrator] Starter | Points: 25

Up
0
Down
Generics helps you decouple data type from the logic , below video explains the same
http://youtu.be/7bKhAJpY9ho?hd=1

Bathala.ramesh430, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 6/10/2011 [Member] [MVP] Bronze | Points: 25
Posted by: Susanthampy on: 6/10/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Also Try this,

http://www.dina.kvl.dk/~sestoft/gcsharp/

Regards,
Susan

Bathala.ramesh430, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/14/2012 [Member] Bronze | Points: 25

Up
0
Down
Please try this link

http://www.dotnetperls.com/generic

Bathala.ramesh430, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhisekjani on: 6/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi ramesh.
go through the links this may helpful for you


http://msdn.microsoft.com/en-us/library/512aeb7t(v=vs.80).aspx
http://msdn.microsoft.com/en-us/library/ms379564(v=vs.80).aspx

Bathala.ramesh430, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sravya on: 11/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi..

We can create a generic collection, that can handle any Type in a generic and Safe Manner.
example.In single Array class,we can use to store a list of users or list of products.
when we actually use it..we will be able to access the Items in the collection directly as a list of users or products...
(simply says...we needn't to do boxing/unboxing,casting when used Generics)

With Regards,
sravya

Bathala.ramesh430, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response