Total Articles: 3

In this article, you're going to learn the many ways to serialize and deserialize C# objects to and from memory and disk. Along the way, you're going to create some classes with extension methods to simplify the serialization process.

In this article you are going to learn how to read and write XML files using C# and .NET Core. There are a few minor differences from the .NET Framework classes you used before. The .NET Core XML processing has been greatly optimized and processes XML files much faster than the .NET Framework. In this article you learn to create XML document in memory, save and load XML files from disk. You also see how to use LINQ to XML for processing XML nodes including sorting, filtering, and aggregation.

LINQ to XML Instead of a Database

Published: 10/1/2012

When people think of having to store data for their applications, a database such as SQL Server immediately comes to mind. However, XML files are very handy for storing data without the overhead of a database. Using XML files to cache often-used, but seldom changed data such as US state codes, employee types and other validation tables can avoid network roundtrips and speed up your application. In addition, XML files are great for off-line applications where a user needs to add, edit and delete data when they can't connect to a database.