I want to build a webservice with this signature, which does not throw an exception if param2 is left empty. Is this possible?
[WebMethod]
public string Hell
I know this post is little old. But I think the method names should be same for the example from Rasik. If both method names are same, then where overloading comes there. I think it should be like this:
[WebMethod(MessageName="Add3")]
public double Add(double dValueOne, double dValueTwo, double dValueThree)
{
return dValueOne + dValueTwo + dValueThree;
}
[WebMethod(MessageName="Add2")]
public int Add(double dValueOne, double dValueTwo)
{
return dValueOne + dValueTwo;
}