Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ide including path in namespace when at class creation
Message
Information générale
Forum:
ASP.NET
Catégorie:
Visual Studio
Versions des environnements
Environment:
C# 5.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01603252
Message ID:
01603258
Vues:
40
Thanks Viv.

I guess a) is for people (unlike me yet) who have decided how to structure their project. So I'll go with b) or just edit the namespace.

And yes, I will try resharper.

>>Update : in VB it does not create such a namespace, which explains why I was not bothered. :)
>>
>>When I create a new class the ide generates a namespace that includes the path. For example, my project is D030, I created a folder duedates, then when I create a new class the IDE generates the namespace D030.duedates.
>>
>>Is that a "feature"? Can I change that behaviour?
>
>Three options:
>
>(a) Go with it. In practice it makes it easier to find files if their namespace matches the folder name (think a while about why you would want separate folders in the same namespace)
>
>(b) If you don't fancy (a) then create the class in the parent folder and then drag it to the sub folder.
>
>(c) If you use Resharper then there is a 'NameSpace Provider' option in the folder properties. If you set it to false then VS still puts the folder name in the namespace but Resharper fixes it with one click....

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform