Note: This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).
We\'re building a web API tha
Using overloads or using C# 4.0 or above
private void GetVal(string sName, int sRoll) { if (sRoll > 0) { // do some work } } private void GetVal(string sName) { GetVal("testing", 0); }