Thank you for your answer. Now I can compile add the web reference, but I
have another problem :-/ When I'm compiling the application, I get an error
when calling a web method that has an object as a parameter. It expect to
receive an object from the web service type, but I'm passing the object from
my class, as it's the object that must receive.
Why do I have this error?
Regards,
Diego F.
"Fitim Skenderi" <fi****@hotmail.com> escribió en el mensaje
news:uO**************@TK2MSFTNGP11.phx.gbl...
All serializable classes have to have a default constructor ie. a
constructor with no parameters. So you need to have a constructor with no
parameters, and your class has to have Serializable attribute. like
[Serializable] // the attrbute
public class Test
{
public Test() // default contructor
{
...
}
}
Fitim Skenderi
"Diego F." <di*****@NOterra.es> wrote in message
news:ed**************@TK2MSFTNGP10.phx.gbl... Hello. I'm getting a serialization error with the following.
I'm doing an app that works with a webservice. The app and the WS has to
work with a class that I made as a DLL; I have some web methods that
receives objects from this class as parameters. Although it compiles,
when I try to add the web reference to the application, I get an error:
"Library.Class cannot be serialized because it does not have a default
public constructor. "
The class has a constructor where I set the attributes, and it's the
only constructor.
Can you please help me?
Regards,
Diego F.