Azavea.Open.DAO.CSV.CsvDaLayer.UseNamedColumns C# (CSharp) Method

UseNamedColumns() protected static method

Checks whether this mapping is using column indexes or named columns. If named columns, returns true (and there must be a header row). If numerically indexed columns, returns false (we assume there is not a header row).
protected static UseNamedColumns ( ClassMapping mapping ) : bool
mapping ClassMapping Mapping for this file.
return bool
        protected internal static bool UseNamedColumns(ClassMapping mapping)
        {
            bool allNumeric = true;
            foreach (string colName in mapping.AllDataColsInOrder)
            {
                int unused;
                if (!int.TryParse(colName, out unused))
                {
                    allNumeric = false;
                    break;
                }
            }
            return !allNumeric;
        }