Пример #1
0
        public bool Equals(MyPair y)
        {
            if (this == null && y == null)
            {
                return(true);
            }
            if (this == null || y == null)
            {
                return(false);
            }

            // Compare value string, not value
            return(this.Name == y.Name && this.ValueStr == y.ValueStr);
        }
 /// <summary>
 /// Find VSPair matching MyPair min-max range
 /// </summary>
 /// <param name="myPair"></param>
 /// <returns></returns>
 public VSPair FindVSPair(MyPair myPair)
 {
     if (this.vsps != null)
     {
         foreach (VSPair pair in this.vsps)
         {
             if (MakePair(pair, null).ValueStr == myPair.ValueStr)
             {
                 return(pair);
             }
         }
     }
     return(null);
 }