In my previous article – File Comparison in C# – Part 1 – I showed you how to create a simple method which compares the file size of two files using the System.IO.FileInfo class. In this article, we will be building upon that previous article so I suggest you read it here before continuing. Now [...]
As a developer you might need to compare files for equality, maybe because you want to verify that your backups are valid, or maybe because you want to search for duplicate files in a folder. Either way you will need to compare two files together, and I am going to show you how. There are [...]
A few days ago I wrote an article on basic XML serialization which looked at the XML serialization of an Employee object that we created. In this article I am going to build on that previous article by serializing a collection of Employee objects, so if you have not read Basic XML Serialization in C# [...]
Serialization is the process of converting the state of an object into a sequence of bits so that it can be transferred over a network or saved to a file on disk. With XML Serialization, instead of converting an object’s state to bits, it will convert an object’s state to XML. This is particularly useful [...]
Listing files from directories and sub-directories is a common requirement for many developers. In this short tutorial I will show you how to do this in two different ways. The Directory.GetFiles() Method This first method is by far the easier of the two, but to implement this you must be working with Microsoft .NET Framework [...]