What is the difference between /// and #region in c#?

后端 未结 8 1977
隐瞒了意图╮
隐瞒了意图╮ 2021-02-13 03:57

What is the difference between ///

and #region ...#endregion statements in c#? Which one the best?

8条回答
  •  庸人自扰
    2021-02-13 04:02

    A region is used to collapse a large area of code and the // is used to add notes without the computer reading it.

    #region your large code
    loads of code in this area.
    #endregion
    
    //This is just a note that the computer won't read.
    

提交回复
热议问题