Generics newbie

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
 
P

Peter Morris

GIYF:

I thought you had missed an "S" off the end, but Googling GIYF revealed the
true meaning of the acronym :)
 
I

Israel

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.
 
T

Tim Roberts

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top