Category Archives: serialization

Control serialization and deserialization in C#

For information on basic serialization and deserialization, see Serialize and deserialize objects in C#. By placing attributes on a class’s properties, you can control how those properties are serialized. The following code shows a Person class that demonstrates several XML … Continue reading

Posted in algorithms, serialization | Tagged , , , , , , , | Leave a comment

Serialize and deserialize objects in C#

Serialization is the process of converting an object into a serial stream-like format. Often that means converting it into XML data for storage or transmission over a network. Deserialization is the process of using a serialization to rebuild the original … Continue reading

Posted in algorithms, serialization | Tagged , , , , , , , , | 1 Comment

Let the user zoom on a picture in C#

The example Provide autosave in C# explains how to make a program that lets the user draw lines in different colors and styles. That program lets the user undo and redo, save and load drawings, and autosaves so it can … Continue reading

Posted in drawing, files, graphics, serialization | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Provide autosave in C#

This example extends the scribble example (most recently described in the post Provide undo and redo in C#) so it provides an auto-save feature. The following code creates the name of the program’s auto-save file. // The auto-save file name. … Continue reading

Posted in drawing, files, graphics, serialization | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Provide undo and redo in C#

This example adds undo and redo features to the example Save and restore pictures drawn by the user in C#. It’s not terribly hard, but it is long so I’ll break it into sections to make it easier to understand. … Continue reading

Posted in drawing, graphics, serialization | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Save and restore pictures drawn by the user in C#

The example Let the user scribble with different line styles in C# explains how to let the user draw curves with different colors, line thicknesses, and dash patterns. This example adds the ability to save and load pictures drawn by … Continue reading

Posted in drawing, graphics, serialization | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , | 3 Comments

A plea for help: Tell me what you want to see in my blog!

I get remarkably little feedback from my blog. I track post views and know that I have 857 Twitter followers, but people rarely let me know if they particularly like or dislike a post. That makes it hard for me … Continue reading

Posted in ADO.NET, algorithms, animation, API, challenges, combinatorics, controls, cryptography, curve fitting, database, extension methods, files, fonts, fractals, games, geometry, globalization, graphics, internationalization, LINQ, localization, mathematics, Office, phone, printing, reflection, registry, serialization, threading, transformations, user interface, Word, wpf, XAML, XML | 13 Comments

How to extract only some of the information from a JSON file in C#

Recall from my post Anatomy of an example that my original goal with this series of articles was to write a program to send an SMS message. To do that, I want to download a file listing SMS gateway email … Continue reading

Posted in algorithms, serialization | Leave a comment

Use JSON to serialize and deserialize objects in C#

JSON (JavaScript Object Notation) is a standard for textual storage and interchange of information, much as XML is. Before you roll your eyes and ask if we really need another language to do what XML does, consider how verbose XML … Continue reading

Posted in algorithms, serialization | 1 Comment