0

I'm using XSD2Code in order to serialize and deserialize an XML document.

For some reason I'm not getting Deserialize method in my intellisense. When I look at the code generated by XSD2Code, I can see these methods:

public static SOMEOBJect Deserialize(string xml)
{
 ..........
}

Could someone please tell me how to call this method?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Nil Pun
  • 17,035
  • 39
  • 172
  • 294

1 Answers1

2

Since I am not sure how are you trying to call the method. As the deserialize method is a static method, you might have to call like this:

SOMEOBJect x = SOMEOBJect.Deserialize(xml);

also make sure the NameSpace selected while you generated the code is the same or either imported as using statements.

franklins
  • 3,710
  • 6
  • 41
  • 56