代码之家  ›  专栏  ›  技术社区  ›  garfbradaz Vivek

自定义格式化类。cs文件-Visual Studio

  •  0
  • garfbradaz Vivek  · 技术社区  · 10 年前

    现在我将C#类文件分为以下几个区域:

    **

    1. 财产区域
    2. 现场区域
    3. 构造函数区域
    4. 方法区域

    **

    当我按 添加新项目->班 这样我可以节省时间吗?

    enter image description here

    我正在使用Visual Studio 2013 Ultimate。

    1 回复  |  直到 10 年前
        1
  •  1
  •   Community Mohan Dere    9 年前

    您可以编辑Visual Studio C#类模板:

    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 答复

    推荐文章