473,811 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Collecti ons.Generic.Que ue"

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 6587
Why not just get array of queue and serialize that. Then deserialize array
and add to new queue.

--
William Stacey [MVP]

<pw*******@gmai l.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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.Collecti ons.Generic.Que ue"
|
| 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
1240
by: Stephan Moeller | last post by:
Hi NG, I serialize the following class over .net remoting: using System; using System.Collections; namespace JobServerLib {
3
1942
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 slower dial-up, the receive callback is not always receiving what I wrote. Analyzing this I see that there is not always a one to one send data/receive data situation. The data seems to come over but comes over in multiple receive callbacks. Since I...
2
3480
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 <u>UnManaged</u> c++ app and get the contents. The reason I nead to serialize the structure is that the Struct is being
3
1806
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 efficiently retrieve/save data to an xml file. have tried deserializing from XML file but having a hard time on mulitple records...
1
1185
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 which is designed to be dropped onto a form and have it's properties manipulated at runtime. I have a custom implementation of the TypeConverter class called UniversalTypeConverter which inherits from ExpandableObjectConverter, and for the most...
1
2408
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 the objects are serializable, and they get placed in the queue with no problems, but on the receiving end, all the values are null. does anyone have any ideas? Thanks in Advance,
2
3515
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 is of XMLDocument type I will get an error. How would you go about this? using System;
2
1779
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 deserializing XML. The first simplest technique I have used ATM is the following: - At program start, if the XML file exists, deserialize it and create an object with its content. - Every time the list changes (an element is added or remove), I...
4
4602
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 length of my queue. I started getting compilation errors when I included a length function. <code> template<class ItemType> void Queue<ItemType>::MakeEmpty() {
0
9727
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10398
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.