Monday, December 19, 2011

Function Parameter Hint

There is a simple method :

/// <summary>
/// <para>strValue can have 3 values "Pass","Fail" or "NA"</para>
/// <para></para>
/// </summary>
/// <param name="strValue"></param>
public bool checkStatus(string strValue)
{
if (strValue == "Pass")
{
//do something
}
else if (strValue == "Fail")
{
//do something
}
else if (strValue == "NA")
{
//do something
}
else
{
//do something
}

return true;
}

When Call