Component or Class

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When you go to the Add New Item Dialog box in VB.Net, you're given the option
of adding a Class or a Component Class.

Exactly when should you use each of them?
 
John,

The component is a kind of wizard as the form is. It creates a class that
inherits from Components. The Idisposable part is created and you get a
grid, on which you can drag components as dataadapterwizard, dataset etc.

A class is complete empty.

So when you want to use those components as datagrid with the designer, than
you can use the component. As well it is usefull when you want to add
unmanaged resources to your class.

I hope this helps,

Cor
 
John,

The component is a kind of wizard as the form is. It creates a class that
inherits from Components. The Idisposable part is created and you get a
grid, on which you can drag components as dataadapterwizard, dataset etc.

A class is complete empty.

So when you want to use those components as datagrid with the designer, than
you can use the component. As well it is usefull when you want to add
unmanaged resources to your class.

I hope this helps,

Cor

Thanks for the words Cor. I hadn't considered using a component for interfacing
with unmanaged dll's. That seems to me a good idea.


Otis Mukinfus
http://www.otismukinfus.com
 
Back
Top