Automatically Add Regions to Code in Visual Studio

后端 未结 7 2054
轻奢々
轻奢々 2021-02-20 06:09

My team absolutely loves using regions, and with that in mind it\'s pretty much become a de-facto standard in our code. I recently came to realization that I\'m sick of writing

7条回答
  •  [愿得一人]
    2021-02-20 06:50

    Use the following snippet

    
    
      
        
    #Classregion #Classregion Code snippet for #Classregion Author Name Expansion SurroundsWith
    name Region name MyRegion

    Save it under C:\Users\\Documents\Visual Studio 2010\Code Snippets\Visual C#\My Code Snippets

    Later it will be accessible in C# code, by Right-Click > Insert Snippet > My Code Snippets > #Classregion

提交回复
热议问题