示例#1
0
        /// <summary>
        /// Fetches the cols as array.
        /// </summary>
        /// <returns></returns>
        public string[] FetchColsAsArray()
        {
            string[] result = new string[TotalCols];

            if (Col1 == null)
            {
                Col1 = string.Empty;
            }

            if (Col2 == null)
            {
                Col2 = string.Empty;
            }

            if (Col3 == null)
            {
                Col3 = string.Empty;
            }


            result[0] = Col1.Replace("\\\\", "\\");
            result[1] = Col2.Replace("\\\\", "\\");
            result[2] = Col3.Replace("\\\\", "\\");


            return(result);
        }
示例#2
0
        public int CompareTo(Test3 other)
        {
            int ret = Col1.CompareTo(other.Col1);

            if (ret == 0)
            {
                ret = string.Compare(Col2, Col2, StringComparison.OrdinalIgnoreCase);
                if (ret == 0)
                {
                    ret = Col3.CompareTo(other.Col3);
                }
            }
            return(ret);
        }
示例#3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Col1 != null ? Col1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Col2 != null ? Col2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Col3 != null ? Col3.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Cols1 != null ? Cols1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Cols2 != null ? Cols2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Cols3 != null ? Cols3.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)EvaluationFn;
         return(hashCode);
     }
 }
示例#4
0
 /// <summary>
 /// Set this matrix to all zeros.
 /// </summary>
 public void SetZero()
 {
     Col1.SetZero();
     Col2.SetZero();
     Col3.SetZero();
 }