The namespace is dictated in the file that the class is defined in, not
the directory that the file is in. You can place whatever classes in
whatever directories you wish, and then make the namespace anything you
wish. There doesn't have to be any correlation between the two.
Perhaps you should think of another classname other than the namespace
name? Also, if you are providing a managed wrapper for windows apis, this
naming convention will probably help:
http://msdn2.microsoft.com/en-us/library/btadwd4w(vs.80).aspx
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"Zytan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I want to have a Win32 class (to dump my win32 dll imports in). I
> want this in it's own directory Win32 in the solution explorer (since
> I have other classes to put in this folder), which makes Win32 a
> namespace. So, this ends up with:
>
> MyProgramName.Win32.Win32.SendMessage
> MyProgramName.Win32.AnotherClass.SomeWrapper
>
> MyProgramName = my program's name
> (1st) Win32 = namespace made from the folder
> (2nd) Win32, AnotherClass = class names
> SendMessage, SomeWrapper = methods
>
> Is this proper? I'd rather have only one Win32 in the first example,
> but that implies the namespace and classname must be one, which makes
> no sense. I believe I've seen this exact thing in the .NET framework,
> and I believe I was warned about how this appears strange to newbies,
> so I think it is proper.
>
> any thoughts welcome,
> Zytan
>