Example #1
0
        public ISet <int> ConvertIngoreColName2FieldIndex()
        {
            ISet <int> IngoreFieldIndex = new HashSet <int>();

            for (int index = 0; index < TargetFeatureClass.Fields.FieldCount; index++)
            {
                IField temp = TargetFeatureClass.Fields.Field[index];
                if (IngoreColNames.Contains(temp.Name) || IngoreColNames.Contains(temp.AliasName))
                {
                    IngoreFieldIndex.Add(index);
                }
            }
            return(IngoreFieldIndex);
        }
Example #2
0
 public void  CreateNullRecordTable(bool ColNameUseAlias = false)
 {
     ResultTable = new DataTable();
     for (int index = 0; index < TargetFeatureClass.Fields.FieldCount; index++)
     {
         IField temp = TargetFeatureClass.Fields.Field[index];
         if (IngoreColNames.Contains(temp.Name) == false || IngoreColNames.Contains(temp.AliasName) == false)
         {
             if (ColNameUseAlias)
             {
                 ResultTable.Columns.Add(new DataColumn(temp.AliasName, typeof(object)));
             }
             else
             {
                 ResultTable.Columns.Add(new DataColumn(temp.Name, typeof(object)));
             }
         }
     }
 }