sloppycode.net
Serialization as a database in C#
Using serialization as persistent object store (in non bs-bingo: a database)
Home
›
Code snippets
›
C#
›
Serialization as a database in C#
Download source
This app from 2004 demonstrates serialization in its simplest form, in particular for use as a storage medium. The demo creates 20,000 "Product" objects, adds them to a collection, and serializes the collection. It's a basic app, it was made to test whether serialization can be used for storing data ('persisting') efficiently.
So long as the objects are simple and the collection is quite small, it's viable. In this example it takes around 10 seconds to deserialize and load the 20,000 objects into a listview.
There are of course far better ways of storing objects to disk. The object framework page has more details of this.
{Name}
Says:
{Date}
{Text}
› Home
› C#
› Snippets
› Articles
› Tools
› Taglines
› ASP
› Dictionary Object
› FSO
› Unix cheat sheet
› Gaming
› CSS
› Yak
› Umbraco
› About
› Contact
› Privacy
› Projects
› Search