自定义格式 Class.cs 文件 - Visual Studio
Custom Formated Class.cs File - Visual Studio
现在我在以下区域构建我的 C# class 文件:
**
- 属性地区
- 场区
- 构造器区域
- 方法区域
**
当我按下 添加新项目 -> Class... 这样我可以节省时间?
我正在使用 Visual Studio 2013 Ultimate。
您可以编辑 Visual Studio C# class 模板:
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$
{
public class $safeitemrootname$
{
#region Properties
#endregion Properties
#region Fields
#endregion Fields
#region Constructors
#endregion Constructors
#region Methods
#endregion Methods
}
}
您可以在 this 答案中看到它们的位置。
现在我在以下区域构建我的 C# class 文件:
**
- 属性地区
- 场区
- 构造器区域
- 方法区域
**
当我按下 添加新项目 -> Class... 这样我可以节省时间?
我正在使用 Visual Studio 2013 Ultimate。
您可以编辑 Visual Studio C# class 模板:
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$
{
public class $safeitemrootname$
{
#region Properties
#endregion Properties
#region Fields
#endregion Fields
#region Constructors
#endregion Constructors
#region Methods
#endregion Methods
}
}
您可以在 this 答案中看到它们的位置。