
Two CS files (using namespaces)
Mike,
In the file without the namespace I believe you want to put this at the
top:
// Use shorthand for the classes in the namespace in the other files.
using MyNameSpace;
This will allow you to use the shorthand for the classes in the other
namespace.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
Quote:
> New to
C# > Using the SDK, do not have VS.NET
> I have two cs files.
> One file contains a few classes. The other contains a
> namespace
> In the file without the namespace I am trying to call a
> class in the namespace.
> I tried to compile both of these files
> csc /t:exe /recurse:*
> Note: These two cs files are the only files I am trying
> to compile. Is there another file I need to link the
> files together?
> Thanks
> Mike
> Error I get when trying to compile------
> cs1.cs(12,5): error CS0234: The type or namespace
> name 'Prin' does not exist in the class or
> namespace 'MyNameSpace' (are you missing an assembly
> reference?)