Beispiel #1
0
 public bool Equals(VariableSet obj)
 {
     if (ReferenceEquals(null, obj))
     {
         return(false);
     }
     if (ReferenceEquals(this, obj))
     {
         return(true);
     }
     //Cannot call _variables.Equals(obj._variables) as trailing zeroes are implicit
     for (int i = 0; i < Math.Max(_variables.Count, obj._variables.Count); ++i)
     {
         if (this[i] != obj[i])
         {
             return(false);
         }
     }
     return(true);
 }
Beispiel #2
0
 public VariableSet(VariableSet variables)
 {
     _variables = new List <decimal>(variables._variables);
 }