Пример #1
0
        /// <summary>
        /// Returns the lowest precedence data type
        /// </summary>
        /// <param name="Affinity">A collection of cell afffinities</param>
        /// <returns>The lowest cell precedence</returns>
        public static CellAffinity Lowest(IEnumerable <CellAffinity> Affinity)
        {
            if (Affinity.Count() == 0)
            {
                return(CellAffinity.CSTRING);
            }
            else if (Affinity.Count() == 1)
            {
                return(Affinity.First());
            }

            CellAffinity a = CellAffinity.CSTRING;

            foreach (CellAffinity b in Affinity)
            {
                a = CellAffinityHelper.Lowest(a, b);
            }
            return(a);
        }