62,047
社区成员
发帖
与我相关
我的任务
分享
public class User:SoapHeader
{
public string uid, pwd;
}
public class Service : WebService
{
public User userinof;
[WebMethod]
[SoapHeader("userinof")]
public int Add(int a,int b)
{
if (userinof.uid == "tom" && userinof.pwd == "123")
{
return a + b;
}
else
return int.MinValue;
}
}