你好,这里有一节课...
公共类认证{
private string userField;
private string passwordField;
public string user
{
get
{
return this.userField;
}
set
{
this.userField = value;
}
}
public string password
{
get
{
return this.passwordField;
}
set
{
this.passwordField = value;
}
}
}
这里的网络服务:
[WebMethod]
public Vehicle[] getVehiculeList(Authentification authentification)
{
....
}
这里是客户端和 webservice 的调用:( 已经定义了与 webservice 中相同的类 Authentification)
Authentification azz = new Authentification() ;
azz.user = "toto";
azz.password = "tata";
string aa = ws.getVehiculeList(azz);
给出错误:错误 27 'WSCL.localhost.Service1.getVehiculeList(WSCL.localhost.Authentification)' 的最佳重载方法匹配有一些无效参数
和
错误 28 参数“1”:无法从“WSCL.Authentification”转换为“WSCL.localhost.Authentification”
有什么帮助吗?
非常感谢 !