There is no requierment that all types that belong to a namespace must
be in the same file.
And I think you are missing something there. If you wan't to compile
everything into one DLL then make a Class library proejct put your
files there compile and you will get your DLL.
| can we do a partial namespace ?
Namespaces can span more than one module (.cs file)
| i want split my cs file (contain all my classes) in a lot of files and then
| compil their into my DLL...
Best practice is to only have one class per module unless the classes are
intimately related.
// net.cs
namespace YourCompany.YourProject.Library
{
...
}
// fileio.cs
namespace YourCompany.YourProject.Library
{
...
}
// xml.cs
namespace YourCompany.YourProject.Library
{
...
}
// img_manipulation.cs
namespace YourCompany.YourProject.Library
{
...
}
Joanna

Signature
Joanna Carter [TeamB]
Consultant Software Engineer
Steph - 31 Mar 2006 10:04 GMT
> | can we do a partial namespace ?
>
[quoted text clipped - 30 lines]
> ...
> }
hum... yes... i m missing something...
so i can do :
csc /target:library /out:mylibrary.dll xml.cs fileio.cs net.cs etc...
?
i m really miss something ;-)
> Joanna
Steph - 31 Mar 2006 10:53 GMT
no work...
i create two .cs file :
"net.cs" with :
namespace myTest
{
public class netTest {
//...
}
}
and a "xml.cs" with :
namespace myTest
{
public class xmlTest {
//...
}
}
then i compil :
csc /target:library /out:mylibrary.dll xml.cs net.cs
but... in my "mylibrary.dll" i v not my "xmlTest" class (or "netTest")...
how do ?
> | can we do a partial namespace ?
>
[quoted text clipped - 32 lines]
>
> Joanna