您的位置:首页 > 编程语言 > C#

C#命名规范

2008-07-04 01:09 357 查看
基本类型:


数据类型

            



缩写



string                    str

int                         i

char                      chr

sbyte                     sb

byte                      bt

uint                       ui

long                      l

ulong                    ul

float                      f

double                   d

bool                      b

decimal                 dec



A、



web



控件

 




控件名

   
             
      
      
      



缩写



AdRotator                                   art

Button                                         btn

Calendar                                      cd

CheckBox                                   chk

CheckBoxList                             chkl

CompareValidator                        cpv

CustomValidator                          ctv

DataGrid                                    dg

DataList                                     dl

DropDownList                            ddl

HyperLink                                  hl

Image                                        img

ImageButton                               Ibtn

Label                                          lbtn

ListBox                                      lst

Panel                                          pl

PlaceHolder                                ph

RadioButton                                rb

RadioButtonList                           rbl

RangeValidator                            rv

RegularExpressionValidator           rev

Repeater                                     rp

RequiredFieldValidator                  rfv

Table                                          tb

TableCell                                    tc

TableRow                                   tr

TextBox                                     txt

ValidationSummary                      vs

XML                                          XML

 



B





html



控件
 




控件名

                                     



缩写



HtmlAnchor                                hah

HtmlButton                                 hbtn

HtmlForm                                   hform

HtmlGenericControl                     hgc

HtmlImage                                  himg

HtmlInputButton

(按钮)

            htxt

HtmlInputButton

(重置)

            hrbtn

HtmlInputButton

(提交)

            hcbtn

HtmlInputCheckBox                    hick

HtmlInputFile                              hifile

HtmlInputHidden                         hihidden

HtmlInputImage                          hiimg

HtmlInputRadioButton                  hirb

HtmlInputText

(密码)

               hpwd

HtmlInputText

(文本)

               hitxt

HtmlSelect                                  hslt

HtmlTable                                   htab

HtmlTableCell                              htc

HtmlTableRow                            htr

HtmlTextArea                              htxta

 



C





ADO.NET



控件命名规范

 




类型

                    



前缀

             



示例



Connection            con                conNorthwind

Command              cmd               cmdReturnProducts

Parameter              parm              parmProductID

DataAdapter           dad                dadProducts

DataReader            dtr                 dtrProducts

DataSet                 dst                 dstNorthWind

DataTable              dtbl                dtblProduct

DataRow               drow              drowRow98

DataColumn           dcol               dcolProductID

DataRelation          drel                drelMasterDetail

DataView               dvw               dvwFilteredProducts
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: