473,396 Members | 1,968 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,396 software developers and data experts.

serializing arraylist

36
hello! I serialize a arraylist & it hv been saved to harddisk but when i load it i found null in that arraylist, but no of elements in this arraylist is saved > 0.
can anybody tell me what is the problem??????/
May 3 '08 #1
3 1575
JosAH
11,448 Expert 8TB
hello! I serialize a arraylist & it hv been saved to harddisk but when i load it i found null in that arraylist, but no of elements in this arraylist is saved > 0.
can anybody tell me what is the problem??????/
Are you sure the elements in your ArrayList all implement the Serializable
interface?

kind regards,

Jos
May 3 '08 #2
pankajs
36
Yeah. I implements Serializable in all the elements also in the superclass.
May 4 '08 #3
JosAH
11,448 Expert 8TB
Yeah. I implements Serializable in all the elements also in the superclass.
Then you have to show us a bit of relevant code that exhibits the problem.

kind regards,

Jos
May 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Pure Krome | last post by:
How do i serialize two instances (of some object) in the same class? I'm not sure how i would de-serialize a class that has two or more instances of some object type, and how the deserialize...
1
by: Christopher Pragash | last post by:
Hello all, I'm trying to persist an object of type Arraylist into XML using the following the XMLSerializer and it returns an "Unknown" Error. I'm able to serialize and deserialize the arraylist...
4
by: Christopher Pragash | last post by:
Hello all, Following is the code that I'm using to serialize an arraylist. This code returns an "Unknown" Errror. Any ideas would be of great help. <System.Xml.Serialization.XmlArray(), _...
0
by: Tom Kent | last post by:
I have an array list of objects that I want to serialize into an XML file. I have tried this using the following code, but it gives me an error message An unhandled exception of type...
3
by: Daniel Lidström | last post by:
Hello, I want to have a class that contains only a collection of another class. For example: public __gc class Alignment { public: Alignment(); ... };
1
by: dotNetDave | last post by:
I'm trying to create xml seriaizable collection class (below), but the xml keeps coming out wrong. In the resulting xml from the web service (below) the "ArrayOfAlarmProcessor" tag should really be...
0
by: Ante Smolcic | last post by:
Hi all, I have an ArrayList that contains items of type A. I declared the XmlArrayItem atribute for that type. Now I have an derived type B (from A) also contained in the ArrayList but I get...
2
by: Q. John Chen | last post by:
I posted this in C# group and just found this spot. I created a class that implements ICollection. After serializing got following result: <?xml version=\"1.0\" encoding=\"utf-16\">...
0
by: Yofnik | last post by:
Is there a way to avoid serializing an empty ArrayList? I would like the following class: public class Collection { public ArrayList Items = new ArrayList(); } ....to serialize like this:
2
by: Phil Galey | last post by:
I'm using VB.NET 2002 on Windows 2000 Pro and am having trouble serializing a SortedList. This is my class: <Serializable()Public Class clsGoodFiles Inherits SortedList Public Sub New()...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.