您好,登錄后才能下訂單哦!
這篇文章給大家介紹C#命名規(guī)范有哪些,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。
1 ADO.NET 命名規(guī)范
數(shù)據(jù)類型 | 數(shù)據(jù)類型簡(jiǎn)寫 | 標(biāo)準(zhǔn)命名舉例 |
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 |
2 WinForm Control 命名規(guī)范
數(shù)據(jù)類型 | 數(shù)據(jù)類型簡(jiǎn)寫 | 標(biāo)準(zhǔn)命名舉例 |
Label | lbl | lblMessage |
LinkLabel | llbl | llblToday |
Button | btn | btnSave |
TextBox | txt | txtName |
MainMenu | mmnu | mmnuFile |
CheckBox | chk | chkStock |
RadioButton | rbtn | rbtnSelected |
GroupBox | gbx | gbxMain |
PictureBox | pic | picImage |
Panel | pnl | pnlBody |
DataGrid | dgrd | dgrdView |
ListBox | lst | lstProducts |
CheckedListBox | clst | clstChecked |
ComboBox | cbo | cboMenu |
ListView | lvw | lvwBrowser |
TreeView | tvw | tvwType |
TabControl | tctl | tctlSelected |
DateTimePicker | dtp | dtpStartDate |
HscrollBar | hsb | hsbImage |
VscrollBar | vsb | vsbImage |
Timer | tmr | tmrCount |
ImageList | ilst | ilstImage |
ToolBar | tlb | tlbManage |
StatusBar | stb | stbFootPrint |
OpenFileDialog | odlg | odlgFile |
SaveFileDialog | sdlg | sdlgSave |
FoldBrowserDialog | fbdlg | fgdlgBrowser |
FontDialog | fdlg | fdlgFoot |
ColorDialog | cdlg | cdlgColor |
PrintDialog | pdlg | pdlgPrint |
3 WebControl 命名規(guī)范
數(shù)據(jù)類型 | 數(shù)據(jù)類型簡(jiǎn)寫 | 標(biāo)準(zhǔn)命名舉例 |
AdRotator | adrt | Example |
Button | btn | btnSubmit |
Calendar | cal | calMettingDates |
CheckBox | chk | chkBlue |
CheckBoxList | chkl | chklFavColors |
CompareValidator | valc | valcValidAge |
CustomValidator | valx | valxDBCheck |
DataGrid | dgrd | dgrdTitles |
DataList | dlst | dlstTitles |
DropDownList | drop | dropCountries |
HyperLink | lnk | lnkDetails |
Image | img | imgAuntBetty |
ImageButton | ibtn | ibtnSubmit |
Label | lbl | lblResults |
LinkButton | lbtn | lbtnSubmit |
ListBox | lst | lstCountries |
Panel | pnl | pnlForm2 |
PlaceHolder | plh | plhFormContents |
RadioButton | rad | radFemale |
RadioButtonList | radl | radlGender |
RangeValidator | valg | valgAge |
RegularExpression | vale | valeEmail_Validator |
Repeater | rpt | rptQueryResults |
RequiredFieldValidator | valr | valrFirstName |
Table | tbl | tblCountryCodes |
TableCell | tblc | tblcGermany |
TableRow | tblr | tblrCountry |
TextBox | txt | txtFirstName |
ValidationSummary | vals | valsFormErrors |
XML | xmlc | xmlcTransformResults |
關(guān)于C#命名規(guī)范有哪些就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。