Metod overloading in web serive

To overload web methods you have to use MessageName attribute otherwise you will get error.

[WebMethod(MessageName = "Hello")]
public string Hello()
{
return "Hello";
}

[WebMethod(MessageName = "HelloWithFirstName")]
public string Hello(string FirstName)
{
return "Hello " + FirstName;
}

Comments

Popular posts from this blog

How to get motherboard serial number, Processor ID, VolumeSerialNumber using C#?

Fiserv Interview Questions.

AngularJs - Simple Example