How to call different namespace
-
Hi: I have a windows Form in C#. In my project I have multiple namespace1 & namespace2 and 1 Form. On the Form I have a Button, when clicking this button I need to call-out to namspace2. Is it possible to do this. Please Help. THanks, Eyungwah
-
Hi: I have a windows Form in C#. In my project I have multiple namespace1 & namespace2 and 1 Form. On the Form I have a Button, when clicking this button I need to call-out to namspace2. Is it possible to do this. Please Help. THanks, Eyungwah
You can't call a namespace. Namespaces contain things like classes, interfaces, enums and so on. If you are in namespace
A
and you want to use a class in namespaceB
you have two options. Option 1: Put a using statement at the top of the file in which you wish to use the namespace. e.g.using B
Option 2: Fully qualify the class, interface, enum, etc. name with the namespace. e.g.B.MyClass
Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website