public void Get(int i){}
[WebMethod]
public void Get(int i, string s)
{}
[WebMethod]
It gives an error:
Both Void Get(Int32, System.String) and Void Get(Int32) use the message name 'Get'. Use the MessageName property of the WebMethod custom attribute to specify unique message names for the methods.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Both Void Get(Int32, System.String) and Void Get(Int32) use the message name 'Get'. Use the MessageName property of the WebMethod custom attribute to specify unique message names for the methods.
if that isn't an option, then pass default values to the service and handle accordingly.
string GetByIntStringAndDate(int i, string s, DateTime d);
using 0, "" and DateTime.Min values for the defaults.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.