Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
Thank You
public class DirectCost
{
public void DirectCost()
{
//...
}
public void DirectCost()
{
//...
}
}
// Correct
UserGroup userGroup;
Assignment employeeAssignment;
// Avoid
UserGroup usrGrp;
Assignment empAssignment;
// Exceptions
CustomerId customerId;
XmlDocument xmlDocument;
FtpHelper ftpHelper;
UriPart uriPart;
// Correct
public static const string ShippingType = "DropShip";
// Avoid
public static const string SHIPPINGTYPE = "DropShip";
do use predefined type names
instead of system type names like
Int16, Single, UInt64, etc
// Correct
int counter;
string name;
// Avoid
int iCounter;
string strName;
do use PascalCasing for abbreviations 3 characters or more (2 chars are both uppercase)
// Correct
string firstName;
int lastIndex;
bool isSaved;
// Avoid
String firstName;
Int32 lastIndex;
Boolean isSaved;
Pascal Casing:
e.g. PascalCasing.
Camel Casing:
e.g. camelCasing.
e.g.
HtmlHelper htmlHelper;
FtpTransfer ftpTransfer;
UIControl uiControl;
do not use Underscores in identifiers. Exception: you can prefix private static variables with an underscore.
public class UserLog
{
public void Add(LogEvent logEvent)
{
int itemCount = logEvent.Items.Count;
// ...
}
}
// Correct
public DateTime clientAppointment;
public TimeSpan timeLeft;
// Avoid
public DateTime client_Appointment;
public TimeSpan time_Left;
// Exception
private DateTime _registrationDate;
By: Asif Bhat
Software Developer
BIT Group Sdn. Bhd.