Click here to Skip to main content
15,887,430 members
Home / Discussions / C#
   

C#

 
AnswerRe: Constraints on generic type parameters Pin
Sun Rays29-Jan-08 23:42
Sun Rays29-Jan-08 23:42 
GeneralRe: Constraints on generic type parameters Pin
N a v a n e e t h30-Jan-08 0:26
N a v a n e e t h30-Jan-08 0:26 
GeneralRe: Constraints on generic type parameters Pin
Sun Rays30-Jan-08 0:37
Sun Rays30-Jan-08 0:37 
GeneralRe: Constraints on generic type parameters Pin
CKnig30-Jan-08 0:42
CKnig30-Jan-08 0:42 
GeneralRe: Constraints on generic type parameters Pin
N a v a n e e t h30-Jan-08 1:01
N a v a n e e t h30-Jan-08 1:01 
GeneralRe: Constraints on generic type parameters Pin
CKnig30-Jan-08 1:07
CKnig30-Jan-08 1:07 
GeneralRe: Constraints on generic type parameters Pin
N a v a n e e t h30-Jan-08 1:12
N a v a n e e t h30-Jan-08 1:12 
GeneralRe: Constraints on generic type parameters Pin
Scott Dorman30-Jan-08 16:38
professionalScott Dorman30-Jan-08 16:38 
Collections are certainly the most common use for generics. However, they can be used in a lot of different domains. Take the case of a custom business object that needs to declare a "key". All of your objects derive from an abstract base type whose "key" field is a generic type. This allows you the flexibility of each concrete object to use it's own data type for that "key" field.

Another example is in the .NET Framework itself with the use of EventHandler<T> which allows you to declare an event handler and define it in terms of the EventArgs class that it uses.

Scott.

—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

[Forum Guidelines] [Articles] [Blog]

Generalproperty of image Pin
justintimberlake29-Jan-08 23:23
justintimberlake29-Jan-08 23:23 
Generaladd runtime textbox in datagrid in c#.net Pin
monika_vasvani29-Jan-08 22:32
monika_vasvani29-Jan-08 22:32 
GeneralRe: add runtime textbox in datagrid in c#.net Pin
sathish s29-Jan-08 22:56
sathish s29-Jan-08 22:56 
QuestionCreate Word files Pin
mpavas29-Jan-08 22:27
mpavas29-Jan-08 22:27 
GeneralRe: Create Word files Pin
Pete O'Hanlon29-Jan-08 23:02
mvePete O'Hanlon29-Jan-08 23:02 
GeneralRe: Create Word files Pin
mpavas29-Jan-08 23:08
mpavas29-Jan-08 23:08 
GeneralRe: Create Word files Pin
Sun Rays29-Jan-08 23:21
Sun Rays29-Jan-08 23:21 
AnswerRe: Create Word files Pin
mpavas29-Jan-08 23:35
mpavas29-Jan-08 23:35 
GeneralRe: Create Word files Pin
mpavas30-Jan-08 19:15
mpavas30-Jan-08 19:15 
GeneralDatarow rowstate Pin
JoZ CaVaLLo29-Jan-08 22:22
JoZ CaVaLLo29-Jan-08 22:22 
GeneralRe: Datarow rowstate Pin
JoZ CaVaLLo29-Jan-08 22:45
JoZ CaVaLLo29-Jan-08 22:45 
GeneralRe: Datarow rowstate Pin
Sun Rays30-Jan-08 0:48
Sun Rays30-Jan-08 0:48 
Generalin ALOGOL_60 assignment operator Pin
prasadbuddhika29-Jan-08 21:10
prasadbuddhika29-Jan-08 21:10 
GeneralRe: in ALOGOL_60 assignment operator Pin
leppie29-Jan-08 22:21
leppie29-Jan-08 22:21 
GeneralRe: in ALOGOL_60 assignment operator Pin
CPallini29-Jan-08 22:23
mveCPallini29-Jan-08 22:23 
GeneralRe: in ALOGOL_60 assignment operator Pin
Pete O'Hanlon29-Jan-08 22:26
mvePete O'Hanlon29-Jan-08 22:26 
GeneralRe: in ALOGOL_60 assignment operator Pin
PIEBALDconsult30-Jan-08 7:24
mvePIEBALDconsult30-Jan-08 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.