Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLSerialization - Cannot serialize interface

Status
Not open for further replies.

123qweasdzc

Programmer
Sep 27, 2005
20
0
0
PT
Hello everyone.

I'm having a problem regarding XML Serialization.

I have a class that implements an interface xpto. When I try to serialize that class, this error is raised:
"Cannot serialize interface xpto"

Is that really impossible to serialize to XML a class that implements an interface?

Thanks in advance,

RT
 
sounds like you're trying to serialize an object that's declared as an interface type.

cast it to the real object and see if it serializes.


mr s. <;)

 
misterstick is right - you have to serialize the class itself, not the interface type.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top