public static bool pcequiv(object k1, object k2) { IPersistentCollection ipc1 = k1 as IPersistentCollection; if (ipc1 != null) { return(ipc1.equiv(k2)); } return(((IPersistentCollection)k2).equiv(k1)); }