This question already has an answer here:
is it possible to use a class created by xsd.exe or by paste to XML as class (VS13), as a normal object? The situation is this, I have a WebService(WS) that receives an Xml
and returns an answer (captain obvious). The xsd as 2000+ lines, so I would like to be able to work with this class that was created and when I wanted to send the info I would serialize it again and send it.
The problem is that when I do the class foo = new class()
it's empty/null, no error is given except the NullReferenceException
. For what I can understand the problem should be coming from the constructor. The empty constructor is created but as no parameters.
So my question is how can I use the class as a normal one, because 2000+ lines file as a lot of attributes that I would like to avoid to be rewritten. What kind of constructor do I have to write or method to generate\create the object.
No comments:
Post a Comment