打印本文 打印本文 关闭窗口 关闭窗口
vb.net程序设计规范(2)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3655  更新时间:2009/4/23 19:01:21  文章录入:mintao  责任编辑:mintao

4.2 变量和常数命名规范

         array                             arr                                          arrShoppingList

         Boolean                                  bln                                          blnIsPostBack

         Byte                                       byt                                         bytpixelValue

         Char                                       chr                                          chrDelimiter

         DateTime                               dtm                                        dtmStartDate

         Decimal                                  dec                                         decAverageHeight

         Double                                   dbl                                          dblSizeOfUniverse

         Interger                                  int                                          intRowCounter

         Long                              lng

         Object                                    obj

         Short                             shr

         Single                                     sng

         String                                     str

 

4.3 函数过程命名规范

4.3.1统一的单词顺序::动词+名次

4.3.2单词的首个字母大写并且名称应该能表达出它们的用途(或者说是意义)。

4.3.3        参数需要指明ByVal还是ByRef(参数是按值传递还是按地址传递)

 

4.4     类命名规范

                         i.              Class声明的类,都必须以名词或名词短语命名,体现类的作用

                        ii.              当类是一个特性(Attribute)时,以Attribute结尾,当类是一个异常(Exception)时,以Exception结尾:
Class ColorSetException
Class CauseExceptionAttribute

                      iii.      

[1] [2] [3] [4]  下一页

打印本文 打印本文 关闭窗口 关闭窗口