Serializing Collections with Interface members

A

Akshay Kumar

I have a collection class and in order to make it type safe etc , I only add
and retrive members of Interface types.

But during XMLSerialization I get errors.

Is there any workaround ?



public class OrgRatingCollection:CollectionBase

{

public void Add(IRating item)

{

this.List.Add(item);

}


public IRating this[int index]

{

get

{


return (IRating) this.List[index];

}

set

{



this.List[index] = value;

}

}

}

}
 
B

Bruce Barker

to serialize a collection, all object in the collection must be
serializable. defining a interface has no impact.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top