Professional Documents
Culture Documents
C# Language
Programming C# Language Coding Standard
Beginner
Syntax ..Logic
C# Language
English
.
..
Coding Standard
C# Coding Standard
Coding
Coding Coding
Coding
Programmer Logic
Software
Coding
App App
Program
Programming Code
App
Coding
Coding Standard
Coding
Standard Coding Standard
Coding
Coding Coding
Coding Coding
Rules
Programmer Programming Language
Language
Coding Standard
Tutorials
.
.
.
App
Standard Coding
. App
.Performance
.
.
.
ROI (Return On Investment) ,,,
.
.
.Performance
.
Programmer Coding
Maintain
Update Coding Standard
Standard Coding
Code Standard
Coding Standard
. Microsoft
Guideline Developer
...
Programming
..
..
A
B
A
1.Pascal Casing
2.Camel Casing
Pascal Casing
Camel Casing
Lower Case
Upper
Case
Pascal Casing
Eg. BackColor , ForeColor , GridView , TextBox , SqlDataSource
Camel Casing
Eg. backColor , foreColor , gridView , textBox , sqlDataSource
// Camel Casing
Coding
Standard
Code
Variables
.Net Interface
Camel Casing ..(eg. IEntity)
Programmer Member Variables
string m_sName;
int nAge;
Programming Languages
.Net Programming Language
Member Variables
m_
C#.Net Variables
Camel Casing
Coding Standard
Variable
int i;
int y;
int z;
.Net for looping
For looping
int i
Camel Casing for looping
Variables
File Name
Pascal Casing
Coding Standard
Text Indent Tab
Space Visual Studio Tab Space 4
Visual Studio IDE
Tab
Space 4
//Declared Variables
string name;
int age;
int phone;
Declared Variables Comment
Variables
Coding Standard
Comment
Code Same Level
//Declared Variables
string name;
int age;
int phone;
Code
//Comment Testing
String name = "Hello";
DateTime currentTime = DateTime.Now;
string fullMessage = "Hello " + name + " This Time is "+ currentTime.ToString();
Console.WriteLine(fullMessage);
Comment
Code Same Level
Coding Standard
Curly braces
Class Method
Visual Studio IDE
Auto
Line
if(.){ // Code
if()
{
// Code
}
if condition
if(Result==0)
{
for(int i=1;i<=10;i++)
{
// Code
}
}
Operator
Single Space Coding Standard
if ( Result == 0 )
{
for ( int i = 1 ; i <= 10 ; I++ )
{
//Code
}
}
Group Code
Blank Line
Console Class Group
Console Console Group
Coding
Group
Code Group
Code Group
Code
#region #endregion
namespace Console1
{
#region RegionTest
class Region
{
public static void Main()
{
Code
Code .Net Collapsed RegionTest
OOP Rules
OOP Rules Private AM Public AM
Coding Standard
UI (User Interface)
Standard
() Variables
Identify
. UI Element
(ui_ )
UI Elements
Group
Group UI
Access
. UI Element
UI Element
Prefix
Table
Prefix
Control
Prefix
Label
lbl
TextBox
txt
DataGrid
dtg
Button
btn
ImageButton
imb
Hyperlink
hlk
DropDownList
ddl
ListBox
lst
DataList
dtl
Repeater
rep
Checkbox
chk
CheckBoxList
cbl
RadioButton
rdo
RadioButtonList
rbl
Image
img
Panel
pnl
PlaceHolder
phd
Table
tbl
Validators
val
Program
1. Method Code
Method Coding Line 1~25
Method 25
Method
Method Output
Method
Output
Method Code Phone No Save
Code
Method Name SavePhoneNumber
Method Name
Method Name
string phonenumber;
string email;
SavePhoneNo(phonenumber);
SendEmail(email);
{
// Code that save PhoneNumber
}
Method
String phonenumber;
String email;
SaveNo(phonenumber,email);
Data Type
4. Programmer
Data Type
int count;
int age;
string name;
object mytype;
Coding Standard
Int32 , String , Object
5.
Parameter
Code
Parameter
Parameter Code
User
(Character)
Error Error
Error Program
Program User
Coding Standard
Coding Standard
If ( MemberType == eMemberTypes.Registered )
{
// Code that do something for Registered Users
}
Else
{
// Error Throw and handling that Error
Error
User
Error
Error Handling try Block catch Block
Coding Standard
If ( MemberType == eMemberTypes.Registered )
{
// Code that do something for Registered Users
}
Else
{
// Code that do something for Guest users and Unkown users
Error Handle
User
Error
}
Error
6.Hardcode Constants
Constants File Code
Constants File Coding Standard
Pure Coding Standard Constants File
Configuration File Database
Code
Coding Standard
Code
If ( name.ToLower() == hello )
{
// Code
}
9. TextBox (Character)
txt.Text= ; string
Coding Standard
.Net string.Empty
If ( name == string.Empty )
{
// Code that do something
}
If ( name == )
{
// Code that do something
}
11. enum
string (or) number
Gender Male Female
string .Net enum
HTML
enum Email
{
Html,
PlainText,
Attachment
}
void SendMail (string message, Email email)
{
switch ( email )
{
case Email.Html:
// Code that Do something
break;
case Email.PlainText:
// Code that Do something
break;
case Email.Attachment:
// Code that Do something
break;
default:
// Code that Do something
break;
}
}
Coding Standard
public protected
Event Handler Method method
Method Method
Drive D: Data Hardcode
D:
D:
A: , B: , Z:
Error
Code
Database
Code
Database Connetion
Code
Problem (Error)
User Message Box
Error
Message Box
Message Box
User
.. ()
User
Label
17.
Code Configuration File
Configuration File
Default Value Configuration
User
Sample
User
Error in Application , There is an Error
User
Database Update Code
Error
Fail to Update Database
20.Login
Please make sure your
username and Password
. username and password are do not match
User
21. Error
Programming
Code Logic
Programming Code
Programmer
Error
Message
..
..
.
Error Message
Coding Standard
Class
Coding Standard
null Return
Coding Standard
null return
ArrayList Return Method
Return
null Return (0)
Return
Application Calling
Count Check
null Return
Check
Hierarchies Level
ASP.Net
Folder
Coding Standard
Root Folder 10
Folders
Folders
Sub Folders 5
Coding Standard Hierarchies Level
Multiple Assembly
Database
Connection
Error
Connection
finally Block
try
{
sqlcon.Open();
Finally
{
sqlcon.Close();
}
Error Connection
30. Variables
Variables
Variables
string name;
int age;
int phone;
string name; int age; int phone;
string objects .Net
string
string object
string object
Sample
recreation
loop
string object
loop string object
StringBuilder class
Looping string object
StringBuilder class Coding Standard
StringBuilder class
Programmer
Architecture
Architecture
1. Layer
Multi Layer (n-Tier) Architecture
2. UI (User Interface) Database Access Code
ASP.Net SqlDataSource
Data Access Layer Database
Database
Update
3. Database Code
Database Exception
try catch finally Block Exception Handler
Database Exception Record
Record Command
Stored Procedure ConnectionString
Record Exception rethrown
4.
Independent Utility Classes Class Library
Database Class Library
Coding Standard
ASP.Net Coding Standard
Using System.Web.HttpContext.Current.Session;
Access
2. Session Object
Session Server Memory
User Server
Session Object
Website
.
CSS Skin File
Page
..
HTML Server Controls
Project HTML Server Controls
HTML Server Controls
ASP.Net Web Server Controls
Project
Comments
Comment
.. Comment
. Coding Comment
Variables Comment
. Comment HTML Comment
/* . */
// (or) ///
ASP.Net <%-- --%>
. Comment
Exception
Exception
Exception
Developer Error
Programmatically Error Checking
Exception .
Message
Exception
2. Message
User
3. Exception Specific Exception
catch
catch(Exception)
{
Console.WriteLine("ERROR");
}
catch(FileIOException)
{
Console.WriteLine(IO Error);
}
.
Specific Exception
Exception
Exception Specific Exception
Exception
Coding Standard
. ..
Coding Standard
Program
Deadline Project Manager
..
Coding Line
Project
Program
Programmer
Program
.Boss
Coding Standard
C# Coding Standard
Zawminsoel
(Initial)