Serialization of a Queue

  • Thread starter Thread starter pwalessi1
  • Start date Start date
P

pwalessi1

Hi. I have a Queue<T> that I need to serialize, but when I try, I get
the error:
"You must implement a default accessor on
System.Collections.Generic.Queue"

It is my understanding that the default accessor has the form,
"function (int index)". But, that doesn't make any sense for a queue.
The reason that I am using a queue is for FIFO access.

Anyway, is there any way that I can serialize my queue?

Thanks for the help.

Pat
 
Why not just get array of queue and serialize that. Then deserialize array
and add to new queue.

--
William Stacey [MVP]

| Hi. I have a Queue<T> that I need to serialize, but when I try, I get
| the error:
| "You must implement a default accessor on
| System.Collections.Generic.Queue"
|
| It is my understanding that the default accessor has the form,
| "function (int index)". But, that doesn't make any sense for a queue.
| The reason that I am using a queue is for FIFO access.
|
| Anyway, is there any way that I can serialize my queue?
|
| Thanks for the help.
|
| Pat
|
 
Never mind. I just used the binary formatter instead of the XML
formatter and it is working fine.
 

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

Back
Top