Generics newbie

  • Thread starter Thread starter Mohd Ebrahim
  • Start date Start date
M

Mohd Ebrahim

Hello,

What is generics and how can I implement the same in my application.

1. Im developing windows forms and where exactly I can use Generics?

2. what are the advantages of generics?

thanks in advance
 
GIYF:

I thought you had missed an "S" off the end, but Googling GIYF revealed the
true meaning of the acronym :-)
 
They're like type safe templates that are fully incorporated into the
language. Personally I hated templates in C++ and refused to use them
unless I was forced to. They were a pain to debug. They were type
unsafe and you wouldn't know there was a problem until you actually
instantiated an instance of the class.
I use generics all of the time now. There are a lot of redundant
classs the software that differ only by type like event arguments for
state machines that only have different enums for states. To create
new event argument classes and remoting wrappers for every new state
machine is just pain.
 
Mohd Ebrahim said:
1. Im developing windows forms and where exactly I can use Generics?

I often find that it is handy to use generic ibuprofen to help alleviate
the headaches I get from developing using windows forms.
 
Back
Top