G
Guest
Hi
Can somebody please tell me what namespaces are actually for?
I notice that when I start a new project in C#, it puts everything in a
namespace of the same name as the project.
I found them a bit annoying as when I save a class's .cs file to my 'generic
code' folder, and then put it in another project, I have to manually go and
change the namespace name. This I find a bit of a PITA.
I used VB.NET for a bit and found it didn't have namespaces by default, but
that it can have them if it wants. I also found that although C# has them by
default, I don't actually have to have them in order to compile.
So - they're not necessary, and seeing as I don't like them, why can't I
turn them off?
And what's the logic behind them being optional in both languages, but on by
default in C# yet off by default in VB.NET?
Can somebody please tell me what namespaces are actually for?
I notice that when I start a new project in C#, it puts everything in a
namespace of the same name as the project.
I found them a bit annoying as when I save a class's .cs file to my 'generic
code' folder, and then put it in another project, I have to manually go and
change the namespace name. This I find a bit of a PITA.
I used VB.NET for a bit and found it didn't have namespaces by default, but
that it can have them if it wants. I also found that although C# has them by
default, I don't actually have to have them in order to compile.
So - they're not necessary, and seeing as I don't like them, why can't I
turn them off?
And what's the logic behind them being optional in both languages, but on by
default in C# yet off by default in VB.NET?