Recently my Project manager asked to write comments, summary and #regions for all the work we have done till now. Even he asked to write for the variable declaration too. Like if we declare an amount as double then he asked us to write like this
/// <summary>
/// RegularPay declared as double
/// </summary>
private double m_dRegularPay;
And even for Get Set too
/// <summary>
/// Get and Set FirstName
/// </summary>
public string FirstName
{
get
{
return m_sFirstName;
}
set
{
m_sFirstName = value;
}
}
And regions while implementing some code
#region EmpHourly
/// <summary>
/// Get Employe Hourly Amount
/// </summary>
/// <param name="EmpAmount"></param>
/// <param name="EmpRegularHours"></param>
/// <param name="EmpHourlyRate"></param>
/// <param name="EmpBonusPay"></param>
/// <param name="EmpOtherHours"></param>
/// <param name="EmpOverTimeHours"></param>
/// <returns></returns>
public bool GetEmpHourlyAmount(out double EmpAmount, out double EmpRegularHours, out double EmpHourlyRate, out double EmpBonusPay, out int EmpOtherHours, out int EmpOverTimeHours)
{
}
What i want to know is is it to the better way of coding standards
Commenting class fields and properties is a good practice, but the region here seems to be pointless. I will also add that the excessive use of out variables isn’t very good C# style. You’d be better off returning an object.