vs2013代码模板设置

模板设置是为了在“添加新项”时默认格式

1、打开文件:D:Program Files (x86)Microsoft Visual Studio 12.0Common7IDEItemTemplatesCacheCSharpCode2052Class

2、把文件中的模板修改自定义的格式

如:

把如下代码修改为自己设置的格式

using System;
using System.Collections.Generic;
$if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
$endif$using System.Text;
$if$ ($targetframeworkversion$ >= 4.5)using System.Threading.Tasks;
$endif$
namespace $rootnamespace$
{
    class $safeitemrootname$
    {
    }
}

修改为

/*
 * 创建人:   hllive
 * 创建时间: 2017/6/12 17:30:01
 * 描述:     $description$
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace es.Common
{
    public class Class2
    {
    }
}

格式可以自定义

效果:

原文地址:https://www.cnblogs.com/hllive/p/6994035.html