Web services Can';t创建一个新的类增量,它是web服务的一部分
我正在webservice中的windows应用程序中使用。 在WebService中,我有以下类:Web services Can';t创建一个新的类增量,它是web服务的一部分,web-services,constructor,windows-store-apps,Web Services,Constructor,Windows Store Apps,我正在webservice中的windows应用程序中使用。 在WebService中,我有以下类: public class User { private string lastName, firstName, email, password, cellPhone; public User(string firstName, string lastName, string email, string phone, string password) { t
public class User
{
private string lastName, firstName, email, password, cellPhone;
public User(string firstName, string lastName, string email, string phone, string password)
{
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.cellPhone = phone;
this.password = password;
}
public User(){}
}
当我尝试在windows应用商店应用程序中创建新的instence时,我使用了以下代码:
ASMXWebServiceReference.User newUser = new ASMXWebServiceReference.User(FirstName.Text, LastName.Text, Email.Text, PhoneNumber.Text, Password.Password);
但我有一个错误:
“ASMXWebServiceReference.User”不包含
接受5个参数
当我用默认构造函数创建一个新的用户指令时,我没有那个错误。
为什么以及如何修复它?密码是文本框的名称,不是吗?实际上,我没有看到属于textbox类的“Password”这样的属性。你试过密码文本吗