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

Generic Serialization?

The target language is .NET 2.0, so Generics are used.

The data that needs to be serialized is a name value pair where the
name is always a string, but the value can be anything that can be
serialized. The value can be an object that has the
SerializableAttribute, implements the ISerializable interface, or a
simple type like an int.

The data is being stored in a Dictionary Generic, what should the type
be of the value? If it is object, then a class that is not
serializable can be added to the collection. Is there any want of
forcing the type to be serializable and still handle basic types like
an int?

Feb 21 '06 #1
0 981

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

Similar topics

0
by: Marco Segurini | last post by:
Hi, I like to know if there is a way to perform a binary serialization of the member variables of a generic class. The code that follow is a my attempt. TIA. Marco.
16
by: tshad | last post by:
This is a little complicated to explain but I have some web services on a machine that work great. The problem is that I have run into a situation where I need to set up my program to access one...
0
by: crazyone | last post by:
I've got a gaming framework i'm building and i want to save myself the trouble of reading and writting the complete game data to a custom file and load/save it to an XML file but i'm getting...
0
by: Mikkel Blanné | last post by:
I haven't been able to find any references to using this combination of technologies (remoting + generic methods + method overloading). I don't think the problem has to do with C#, but I couldn't...
1
by: Craig Buchanan | last post by:
I have a class named 'Filter'. It has a property named 'Destinations' (an ArrayList). I would like the Destinations property to be a collection of objects. The objects that can be collected are:...
2
by: =?Utf-8?B?RFhSaWNr?= | last post by:
I have a class (UserAccount) that uses a List<Tto contain a collection of Account classes. The Account class uses a List<Tto contain a collection of the account items. If the Account class is a...
1
by: JSeemann | last post by:
Hi there, I have an issue with serializing C# objects to XML using a generic type using System.Xml.Serialization. Say I have classes defined as below: public class ParentClass { private...
4
by: Steffen Bobek | last post by:
Extension methods are made for use with instances. I'd like to "misuse" them as static methods, too. Let me tell you my ambition: I use an extension method to serialize objects somehow like this:...
14
by: Ron | last post by:
I am trying to build a generic static method that will return a specified type from a method. My problem is that I need to return say an image from the method...and I'm having trouble...
6
by: phancey | last post by:
I want to define a class like this class MyClass { List<TMyList<Twhere T : IMyList {get; set;} } or something like this. I don't want to put <Ton my class definition
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.