How to turn off automatic namepsaing in Visual Studio

R

Richard Coltrane

Hi there,

Does anyone know how to turn off automatic namespacing in Visual Studio for
C#? Everytime i create a class it gets named according to what folder its in
and i really really hate that it does that.

Thanks

RC
 
G

GS

don't know about turning it off


however, I do this: create a project. C# will create file for whatever
project type you picked. say class1.cs. first thing I do and click on
project properties and specify all the things I want including default name
space
then go back to solution explorer rename the project , rename the class1.cs
to whatever and delete namespace .... from it
save project


certainly it will be nice if I can specify the solution/project name, name
space and class/form/control name first.

however I am using the free express 2008, so I won't complain too much
 
M

Marc Gravell

Truly? I really like that feature...

OK... how about you create the class in the project root and then drag
it? It should only take one more "drag".

Alternatively, it *might* be possible to edit the template files to
help, but I'd have to take a look (no time at this moment).

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top