SHARE
TWEET

Untitled

a guest Jun 25th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IFields fields = new FieldsClass();
  2. IFieldsEdit fieldsEdit = (IFieldsEdit)fields;
  3. fieldsEdit.FieldCount_2 = 10;
  4.  
  5. IField field = new Field();
  6. IFieldEdit fieldEdit = (IFieldEdit)field;
  7. fieldEdit.Name_2 = "RULEID";
  8. fieldEdit.AliasName_2 = "RULEID";
  9. fieldEdit.Type_2 = esriFieldType.esriFieldTypeOID;
  10. fieldsEdit.set_Field(0, field);
  11.  
  12. // Add other fields...
  13.      
  14. // use IFieldChecker to create validated fields collection
  15. IFieldChecker fieldChecker = new FieldChecker();
  16. IEnumFieldError enumFieldError = null;
  17. IFields validatedFields = null;
  18. fieldChecker.ValidateWorkspace = (IWorkspace)fws;
  19. fieldChecker.Validate(fields, out enumFieldError, out validatedFields);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top