Just because a name exists in a namespace, doesn't mean you can just use it!
Generally speaking (and certainly for beginners) follow the simple rule: one project, one namespace. If you need a second namespace, create a second project (that creates a Class Library) and add a reference to that to the original project together with a
using
statement in the code files that will use the classes the new project contains.
MyEXEProject MyClassLibraryProject
MyEXEClass.cs MyClassLibrary.cs
using System; using System;
... ...
using MyClassLibrary
namespace MyEXEProject namespace MyClassLibrary
{ {
public partial class MyForm: Form public partial class MyClass
{ {
MyClass myClass = new MyClass();
... ...
} }
} }
Once you have that, you should be able to use the classes from either namespace as if they were in the same one (almost).
What do you have that is different?