1. Trang chủ
  2. » Luận Văn - Báo Cáo

Project name: C# Coding convention

5 73 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 387,37 KB

Nội dung

Project name C# Coding convention this document is specified for SWT’s developers who will attempt to a C# project development. The developers should read this specification for standardization coding style and understandable for other teammates. After all, it could make your project more standard and professional.

[PROJECTNAME] C# Coding convention Date [May 18, 2010] Version [1.1] Status [Approved] Author [Nguyen Thi Thanh Thuy, CEO] Reviewed by [Le Tat Hai, Technical Director] Approved by [Nguyen Thi Thanh Thuy, CEO] Smart World Technology Co. ltd Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam Phone: 84­8­6674 9024 Fax: 84­8­6258 4459 Website: www.smartworld.com.vn Revision History Date Version Description 07/8/2011 1.0 State out basically coding standard for C Sharp  language 07/8/2011 1.0 Added naming of GUI controls in VS C# 2005 07/8/2011 1.0 Fixed Method style from camelCase to PascalCase Smart World Technology Co. ltd Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam Phone: 84­8­6674 9024 Fax: 84­8­6258 4459 Website: www.smartworld.com.vn Author Table of Contents  1. INTRODUCTION                                                                                                                               4  2. CODING CONVENTIONS                                                                                                                 4 Smart World Technology Co. ltd Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam Phone: 84­8­6674 9024 Fax: 84­8­6258 4459 Website: www.smartworld.com.vn Introduction This document is specified for SWT’s developers who will attempt to a C# project development.  The developers should read this specification for standardization coding style and understandable  for other teammates. After all, it could make your project more standard and professional Note that, this document just specified with C# Language Coding Conventions 2.1 Terminology and Definition Access Modifier C# keywords public, protected, internal, and private declare the allowed code­ accessibility of types and their members.  Although default access modifiers vary, classes and  most other members use the default of private.  Notable exceptions are interfaces and enumerate  which both default to public   Camel Case: A word with the first letter lowercase, and the first letter of each subsequent word­ part capitalized. Example: customerNameAndThings  Pascal Case: A word with the first letter capitalized, and the first letter of each subsequent word­ part capitalized. Example: CustomerNameAndThings Always : It must be follow this specification as a law Avoid: It should be avoid use this specification. In worst, it could be use.  Never: Every exceptions of this case is not allowed Possible: It recommend follow this specification 2.2 “c” “P” “U” “_” Naming Conventions camelCase PascalCase UPPERCASE Prefix with “_” 2.3 Field ­ Avoid using public field (it’s not recommend of using public) ­ Pascal Case if public or prefix with “_” and Pascal Case if access modifier is protected, internal, private Examples: public string Name; private int _Age; ­ Any GUI controls could be named with PascalCase but it’s must be prefix with GUI type (or abbreviate type) Example: Control Name Prefix Example Label lb lbLable Button bt btButton ListBox ls  lsListBox Smart World Technology Co. ltd Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam Phone: 84­8­6674 9024 Fax: 84­8­6258 4459 Website: www.smartworld.com.vn RadioButton (Option  buttons) op opRadioButton ComboBox cb cbComBox MenuStrip mnu  mnuMenuStrip TextBox tx txTextBox CheckBox ck ckCheckBox CheckedListBox ckl cklCheckListBox ListView lv lvListView PictureBox pb pbPictureBox TreeView trv trvTreeView Panel pn pnPanel GroupBox gb gbGroupBox RichTextBox rtx rtxRichTextBox Control Name Prefix Example LinkLabel lkl lklLinkLabel ProgressBar pgb pgbProgressBar ToolTip tt ttToolTip TabControl tbc tbcTapControl ContextMenuStrip cmnu cmnuContextMenuStrip StatusStrip sts stsStatusStrip ImageList imgl imglImageList Timer tm tmTimer Smart World Technology Co. ltd Address: 02 No Trang Long Street, ward 13, Binh Thanh District, HCMC Vietnam Phone: 84­8­6674 9024 Fax: 84­8­6258 4459 Website: www.smartworld.com.v ... This document is specified for SWT’s developers who will attempt to a C# project development.  The developers should read this specification for standardization coding style and understandable  for other teammates. After all, it could make your project more standard and professional... for other teammates. After all, it could make your project more standard and professional Note that, this document just specified with C# Language Coding Conventions 2.1 Terminology and Definition Access Modifier C# keywords public, protected, internal, and private declare the allowed code­... Version Description 07/8/2011 1.0 State out basically coding standard for C Sharp  language 07/8/2011 1.0 Added naming of GUI controls in VS C# 2005 07/8/2011 1.0 Fixed Method style from camelCase to PascalCase

Ngày đăng: 15/01/2020, 04:57

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w