PC Review


Reply
Thread Tools Rate Thread

XML Serialization - Interface

 
 
joss
Guest
Posts: n/a
 
      6th Sep 2005

I have a base class that inherits from CollectionBase that stores a
group of objects that inherit from an interface (let's call it
IEntity). The default item[] property and Add() method both handle
IEntity types, and I implement this interface on several objects. When
trying to serialize it I get a serialization error ("cannot serialize
interface IEntity") when I try to return a class that contains a
property that uses the collection type.
I tried shadowing the item[] member to return a class type rather than
an interface type, but no luck.

I'm starting to loose the rest of my hair ;-)

Thanks in advance,

Josselin

 
Reply With Quote
 
 
 
 
S. Senthil Kumar
Guest
Posts: n/a
 
      6th Sep 2005
Does IEntity have the Serializable attribute?

Regards
Senthil

 
Reply With Quote
 
joss
Guest
Posts: n/a
 
      6th Sep 2005
nope, this is an interface public the class inheriting it is.

 
Reply With Quote
 
joss
Guest
Posts: n/a
 
      6th Sep 2005
nope. I wouldn't think that is related.
This is an inteface, the class inheriting is is declared as
Serializable.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recursive XML serialization? XML serialization of cyclic objects? =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno Microsoft C# .NET 2 16th Jan 2007 04:52 PM
Serialization and de-serialization of types loaded from assembly at runtime mookid8000@gmail.com Microsoft C# .NET 6 1st Mar 2006 10:27 AM
Smart Pointers (SQLDMO): Acquiring SQLServer2 interface from SQLServer interface? Mark Findlay Microsoft Dot NET 1 23rd Dec 2005 11:08 AM
Reflection: CreateInstance(Type) of class that supports known interface - Get actual interface reference to object? Chris Morse Microsoft VB .NET 10 16th Jan 2004 02:30 AM
Interface Members Serialization cisco Microsoft Dot NET Framework 0 10th Nov 2003 09:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:25 PM.