473,385 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Serialization of a Queue

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

Mar 16 '06 #1
2 6564
Why not just get array of queue and serialize that. Then deserialize array
and add to new queue.

--
William Stacey [MVP]

<pw*******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
| 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
|
Mar 16 '06 #2
Never mind. I just used the binary formatter instead of the XML
formatter and it is working fine.

Mar 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephan Moeller | last post by:
Hi NG, I serialize the following class over .net remoting: using System; using System.Collections; namespace JobServerLib {
3
by: John Hoffman | last post by:
Hello, I've got a client server app that passes C# objects back and forth using TCP/IP Async Sockets and Serialization. Works great in the lab, but when I try it on a the internet or through a...
2
by: Brian Keating | last post by:
Hello there, I wonder can anyone help point me in correct direction. Basically I have a Managed structure and I want to Serialize to to a byte array, Then I want to read this byte array in my...
3
by: umbertoeklat | last post by:
as a proof of concept, am trying create a web app w/ an XML file as a temp DB What is the fastest way to do serialization/deserialization? or maybe the better question would be how to...
1
by: Alex Clark | last post by:
Hi all, Apologies for the cross-post but I can't determine if this is a VS .NET problem or a VB.NET language issue. I'm using .NET 1.1 SP1, VS 2003 EA, VB.NET. I'm coding a custom component...
1
by: m.i.mustafa | last post by:
I'm having problems with De-Serializing a complex object I'm sending through a queue. I call it a complex object simply because its a business object that is composed of other objects. Now all...
2
by: et_ck | last post by:
Hi, Is it possible to serialize a property of XmlDocument type within a class? For example, I'm able to serialize the following class for the "Items" property. But when I include a property that...
2
by: =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno | last post by:
I am developing a Windows Service that is resident on the machine. The program needs to synchronize certain object list in memory (an object typed as List<Foo>) with disc, serializing and...
4
by: j_depp_99 | last post by:
Thanks to those guys who helped me out yesterday. I have one more problem; my print function for the queue program doesnt work and goes into an endless loop. Also I am unable to calculate the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.