views:

16

answers:

1

When defining parameter type that is e.g. in System.Data you have no intellisense and your class code will not have required using to compile the code. Is there a way to add it? That would be good to be able to add usings to class or groups of classes right from class designer, but I didn`t find how to do it.

A: 

While it's not exactly what you want, you can get the class designer to generate code that depends on other namespaces by doing 2 things:

  1. Ensure that the assembly that has the namespace you want to use is referenced by your project.
  2. Use the fully qualified name of the type instead of the local name. (instead of using DataSet use System.Data.DataSet)
free-dom
Yes, I`m doing it the 2nd way, but it`s a bit long and I`m looking for a better way :-)
Yaroslav Yakovlev