The Standard Query Operators is an API that enables querying of any .NET array or collection.
I will compare two folders using query operators.
var folder1 = Directory.GetDirectories(@"C:\");
var folder2 = Directory.GetDirectories(@"C:\Windows");
// if they are not equal
if(!folder1.SequenceEqual(folder2))
{
//get missing folders
var Folders = folder1.Except(folder2);
//iterate the missing folders
foreach (var folder in Folders)
Response.Write(folder);
}