Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (GoldNum != 0)
            {
                hash ^= GoldNum.GetHashCode();
            }
            if (PowerNum != 0)
            {
                hash ^= PowerNum.GetHashCode();
            }
            if (EncourageNum != 0)
            {
                hash ^= EncourageNum.GetHashCode();
            }
            if (RefreshTime != 0L)
            {
                hash ^= RefreshTime.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
 public static bool IfHasPower(string username, string strpower, PowerNum pn)
 {
     if (username != "admin")
     {
         return IsTrue(strpower, pn.GetHashCode().ToString());
     }
     return true;
 }