You might want to make sure that a schema lock isn't preventing you from adding the field:
public void AddFieldToFeatureClass(IFeatureClass featureClass, IField field)
{
ISchemaLock schemaLock = (ISchemaLock)featureClass;
try
{
// A try block is necessary, as an exclusive lock may not be available.
schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);
// Add the field.
featureClass.AddField(field);
}
catch (Exception exc)
{
// Handle this in a way appropriate to your application.
Console.WriteLine(exc.Message);
}
finally
{
// Set the lock to shared, whether or not an error occurred.
schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock);
}
}