예제 #1
0
 public override bool Equals(object obj)
 {
     if (obj is ValX1 <T> )
     {
         ValX1 <T> v = (ValX1 <T>)obj;
         return(CompareTo(v) == 0);
     }
     return(false);
 }
예제 #2
0
 public ValX1 <int>[] MakeValX1ArrayInt(int[] items)
 {
     ValX1 <int>[] arr = new ValX1 <int> [items.Length];
     for (int i = 0; i < items.Length; i++)
     {
         arr[i] = new ValX1 <int>(items[i]);
     }
     return(arr);
 }
예제 #3
0
        public int CompareTo(ValX1 <T> obj)
        {
            if (Object.ReferenceEquals(_val, obj._val))
            {
                return(0);
            }

            if (null == _val)
            {
                return(-1);
            }

            return(_val.CompareTo(obj.Val));
        }
예제 #4
0
 public bool Equals(ValX1 <T> x)
 {
     return(0 == CompareTo(x));
 }