private static bool AreEqual(ClassDescriptor x, ClassDescriptor y) { if ((x == null) != (y == null)) { return(false); } if (x == null) { Assert.Null(y, "Invalid program"); return(true); } return(x.HasEqualType(y)); }