Global user type definition

  • Thread starter Thread starter Ole
  • Start date Start date
O

Ole

Hi,

Is it possible to create a type that I can import in any solution and user
control etc so that it can be used the same way as system types (like Int32,
String etc.)?

Thanks,
Ole
 
Sure - just declare a type in a library assembly (dll), and reference
it from the other projects. Job done. Types that represent small
values "like numbers" are generally structs, and are almost always
immutable. But most user types should be classes. If in doubt, it
should probably be a class. Have I understood correctly?

Marc
 
Yes - you understood exactly what I meant - thanks!

My user type is a class, so theree'll be no problem.

Thanks
Ole
 

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

Back
Top