public int CompareTo(object obj) { ACL acl = (ACL)obj; if (acl == null) { throw new InvalidOperationException("Comparing different types of records."); } int num = 0; num = (this.Perms == acl.Perms) ? 0 : ((this.Perms < acl.Perms) ? -1 : 1); if (num == 0) { num = this.Id.CompareTo(acl.Id); if (num != 0) { return(num); } } return(num); }
public int CompareTo(object obj) { ACL peer = (ACL)obj; if (peer == null) { throw new InvalidOperationException("Comparing different types of records."); } int ret = 0; ret = (Perms == peer.Perms)? 0 :((Perms < peer.Perms)?-1:1); if (ret != 0) { return(ret); } ret = Id.CompareTo(peer.Id); if (ret != 0) { return(ret); } return(ret); }
public int CompareTo(object obj) { ACL acl = (ACL)obj; if (acl == null) { throw new InvalidOperationException("Comparing different types of records."); } int num1 = this.Perms == acl.Perms ? 0 : (this.Perms < acl.Perms ? -1 : 1); if (num1 != 0) { return(num1); } int num2 = this.Id.CompareTo((object)acl.Id); if (num2 != 0) { return(num2); } return(num2); }