473,487 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Color Serialization

Hi,

I have a class with properties, and one of the properties is of type
Color. I am Serializing this class to an XML file.

In the file the XML tage for the Color property is remaining empty:
"<EditorBackcolor />".

What should the problem be?
Thanks in Advance

Mar 14 '06 #1
2 8131
I assume you're using the XmlSerializer class to do your serializing.
If so it only serializes the public properties of classes, and Color
has not public properties so nothing gets serialized.

You have to wrap the Color object in an object that exposes the Color
objects value as a property somehow and use some attribute to make the
serializer skip the real Color property and use the wrapped color
object property instead.

Or handle serialization of the class that has a public Color property
yourself.

Mar 14 '06 #2
Following this link,

http://www.codeproject.com/soap/xmls...asp#xx555040xx

Problem has been solved.
Thanks

Mar 14 '06 #3

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

Similar topics

1
2277
by: Mike Frayn | last post by:
Hello again, Okay, I was reading the following tutorial on serialization of user-defined classes, and it seems pretty straightforward: http://www.sys-con.com/story/?storyid=44199 That...
37
4942
by: Ben | last post by:
Hi, there. Recently I was working on a problem where we want to save generic closures in a data structure (a vector). The closure should work for any data type and any method with pre-defined...
3
3058
by: Franz | last post by:
Let me describe the flow of my program first. 1. Deserialize data from xml file. 2. Addition of "PersonType" class to the AllPersonalData. 3. Serialize data back to the xml file. My question is...
3
3151
by: Aaron Clamage | last post by:
Hi, I'm not sure that if this is the right forum, but any help would be greatly appreciated. I am porting some java serialization code to c# and I can't figure out the correct way to do it. ...
3
2434
by: Alexander | last post by:
When i store rule on PC with .NET.SP1 i cant restore them from PC without SP1. An i get this Error: System.Runtime.Serialization.SerializationException: Possible Version mismatch. Type...
3
2853
by: Steve | last post by:
I've been following a couple remoting tutorials on the web, they are all pretty much the same. I've got my different applications built(client, server and remote object (dll)) The client is...
3
2736
by: AVL | last post by:
Hi, I'm new to .net. I need some info on serialization. What is serialization? Why do we need it? Why objects need to be serialized if they need to be stored in session or viewstate?
1
3072
by: Christo | last post by:
as part of a project at uni i have been asked to provide object persistance through files I have opted for serialization my question is quite simple when u use serialization is an object...
2
8528
by: antoan | last post by:
I'm trying to understand why static fields are not serializable in general. Is it purely because of implementation reasons or because it does not make sense to do this?
0
7105
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
7180
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...
1
6846
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
5439
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,...
1
4870
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...
0
3076
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...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.