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

Custom Collection

I have started to implement Strongly typed CustomCollection for my Entities
instead of using Dataset & Datatable..

All my Collection Classes inherit from CollectionBase.. I tried to serialize
my class to save state by implementing ISerializable interface but I wasn't
able to deserialize it again (so my class wont manage it's state) because
InnerList & List is read only so How could i work around this??
Am i better use microsoft cache Block to cache my collection or i better use
serialize my collection and how??

thanx
Nov 19 '05 #1
2 999
May be I miss some concept in serialization topic while i didn't use it
before so any help to make things clear to me will be great.
"Islamegy®" <Is******@Private.4me> wrote in message
news:eM**************@TK2MSFTNGP15.phx.gbl...
I have started to implement Strongly typed CustomCollection for my Entities
instead of using Dataset & Datatable..

All my Collection Classes inherit from CollectionBase.. I tried to
serialize my class to save state by implementing ISerializable interface
but I wasn't able to deserialize it again (so my class wont manage it's
state) because InnerList & List is read only so How could i work around
this??
Am i better use microsoft cache Block to cache my collection or i better
use serialize my collection and how??

thanx

Nov 19 '05 #2
You can certainly serialize and deserialize as XML classes which inherit
CollectionBase. There are a few rules:

1. The class must implement a parameterless Contructor. You can overload it
if necessary.
2. There must be an Add Method defined.

See the following for more details:

http://msdn.microsoft.com/library/de...ialization.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Islamegy®" <Is******@Private.4me> wrote in message
news:OP**************@TK2MSFTNGP14.phx.gbl...
May be I miss some concept in serialization topic while i didn't use it
before so any help to make things clear to me will be great.
"Islamegy®" <Is******@Private.4me> wrote in message
news:eM**************@TK2MSFTNGP15.phx.gbl...
I have started to implement Strongly typed CustomCollection for my
Entities instead of using Dataset & Datatable..

All my Collection Classes inherit from CollectionBase.. I tried to
serialize my class to save state by implementing ISerializable interface
but I wasn't able to deserialize it again (so my class wont manage it's
state) because InnerList & List is read only so How could i work around
this??
Am i better use microsoft cache Block to cache my collection or i better
use serialize my collection and how??

thanx


Nov 19 '05 #3

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

Similar topics

8
by: Tinus | last post by:
Hello all, I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn...
21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
6
by: kbs | last post by:
Hi, I'm looking for some good examples that illustrate how to code a web service that exposes a custom collection so that the properties of the collection are accessible on the client without...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
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...
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
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
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...
0
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...

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.