C # Programming Specification __ Programming

Source: Internet
Author: User

  Aim for others to read later, modify more convenient naming the first principle with meaningful descriptive words to name, can see what to do, at a glance 1. Use abbreviations less, use full name as far as possible, use name,address, do not nam,addr 2. In addition to the cycle, less with i,jn,x, but with the index,temp suffix, Pascal nomenclature: The first letter of the word uppercase, after each word capitalized, examples are as follows public class DataBase public void Getdatatable () Class naming Pascal naming method window naming format: WD opening pop-up window naming pascal naming format: PW opening user control naming Pascal naming method window naming format: UC opening method naming Pascal naming method window naming as far as possible with the verb start, do see the name can be big I know the main function attribute named Pascal naming method window name can know the main function variable name in front of the attribute name underlined (_), do see the name can probably know the main function control name button (Radbutton,button): btn Drop-down box (radcombobox,combobox): CMB list box (LISTBOX): LST Radio Box (raiodbox): Rdb text Box (TextBox): TXT table (radgridview): GRDV menu (Radmenu): Mnu checkbox: Chk (label): LBL annotation class comment indicates .... The class that provides .... Method Property Note Sets or gets a value that indicates .... If only get (gets a value that indicates ...). If you have only get (set a value that indicates ...). Method comment indicates .... The method format #region event #endregion #region Property #endregion #region method #endregion #region Variable #endregion All code must be included in these four categories (constructors belong to methods) Shortcuts and shortcut shortcuts: Formatting code: CTRL+E+D Toggle: Ctrl+e+w Shortcut method: Delete all empty rows in the page: ^:b*$/n change the performance of the custom variable declaration with the previous replacement string:string Boolean:bool I Nt32:int Object:object Decimal:decimal Double:double other similar, the definition that starts with uppercase  

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.