Reputation: 17145
Whenever I create a C# class in Visual Studio it has the following lines at the beginning of file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
I want it to have other namespaces there by default when I create a new C# class. how can I do that?
Upvotes: 4
Views: 335
Reputation: 4278
Create a template for visual studio:
http://msdn.microsoft.com/en-us/library/6db0hwky(v=vs.90).aspx
EDIT: You can modify an existing template by loading it up, making the changes you require and then using the export template option (in the file menu) and follow the wizard through selecting the options you require.
Further update: to see the contents of c# class template look in:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class
For VS2012 only
Upvotes: 4