string dir = @"X:\Dir1\Dir2\Dir3\Dir4\Dir5\Dir6";
//1
Console.WriteLine(Directory.GetParent(
Directory.GetParent(dir).FullName).FullName);
//2
DirectoryInfo dir2 = new DirectoryInfo(dir);
Console.WriteLine(dir2.Parent.Parent.FullName);