I have a namespace ABC, which has one form class, F and an ordinary class C. Now I have another namespace XYZ with many different classes. Now, F is used only from C and nowhere else in the program. Every other classes use C, not F.
In visual studio (2010), from classes in XYZ namespace I can see F listed in the intellisense dropdown (since I’ve referenced ABC to use C). How can I prevent that?I want only C there. Any method would suffice as long as I can use C from XYZ.
Thanks.
Is there any reason why you can’t put it in another namespace to hide it from the other classes, e.g. namespace ABC.Forms ?
If it were anything other than a form class (therefore is a partial class if you are using a recent version of .net) – I would say, why not make it an inner class to C – but I doubt that would be neat with a form class.
I would go with the namespace change.