Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Folder Name Added To Class Namespace
Message
From
26/05/2009 18:38:25
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01401977
Message ID:
01402130
Views:
35
>>>I added folders in the Solution Explorer for various components in my app. When I create a new class in a folder, the folder name is appended to the namespace.
>>>
>>>Any way to prevent this?
>>
>>I haven't asked this question yet, but am interested in the answer also.
>
>You have to either create your own VS template or modify the existing set.
>
>Here's how to create your own:
>
>http://www.rcs-solutions.com/blog/2008/11/27/VisualStudioTemplates.aspx
>
>To edit the default on, take a look in this folder:
>
>C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesCache\Web\CSharp\1033\class.zip
>
>There are zip files that contains Class.cs - edit that one.


Don't forget to re-zip the file after you edit it. Also while you are at it another good edit is to add the "public" to default classes. I hate they get created as private when you create a new class.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform