2.局部變量隨用隨聲明,盡量少用goto語句
3.如果參數多,建議使用結構,避免對大段代碼使用try...catch語句
4.同一個文件中避免編寫多個" />

亚洲男人天堂av,国产一区二区久久精品,国产精品一区二区久久精品,国产精品久久久久久一区二区三区,五月婷婷在线观看视频,亚洲狠狠色丁香婷婷综合

歡迎您訪問編寫規范的基本規定?!

編寫規范的基本規定?

更新時間:2021-06-10 12:54:34作者:admin2

1.盡量使用接口編程,關鍵語句一定編寫注釋

2.局部變量隨用隨聲明,盡量少用goto語句

3.如果參數多,建議使用結構,避免對大段代碼使用try...catch語句

4.同一個文件中避免編寫多個類,字符串多變時,用StringBuilder

5.if語句塊使用{},switch語句中一定編寫default

# 常用的兩種命名方法

1.Pascal命名法:所有單詞第一個字母大寫,其它字母小寫 User

一般用于定義函數名稱或是類名稱

2.Camel命名法:除了第一個單詞,所有單詞第一個字母大寫,其它字母小寫

一般用于定義函數的參數或是局部變量的時候使用

# 程序中各元素的命名規范

1.項目名:公司域名.產品名稱。

2.命名空間名:公司名稱/產品名稱。

3.接口:一切接口開始于“I”。

4.類名:功能與操作的完美結合。

5.方法名:動賓關系,實現何種操作。

6.成員變量:盡可能加前綴。

主站蜘蛛池模板: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |