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:
- Ensure that the assembly that has the namespace you want to use is referenced by your project.
- Use the fully qualified name of the type instead of the local name. (instead of using DataSet use System.Data.DataSet)
free-dom
2009-08-30 14:35:08
Yes, I`m doing it the 2nd way, but it`s a bit long and I`m looking for a better way :-)
Yaroslav Yakovlev
2009-08-30 15:16:54