This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IC > IClass Interface > IClass.DeleteField Method (ArcObjects .NET 10.5 SDK) |
Deletes a field from this object class.
[Visual Basic .NET] Public Sub DeleteField ( _ ByVal Field As IField _ )
[C#] public void DeleteField ( IField Field );
[C++]
HRESULT DeleteField(
IField* Field
);
[C++]
Parameters Field [in]
Field is a parameter of type IField
FDO_E_FIELD_CANNOT_DELETE_WEIGHT_FIELD:
FDO_E_FIELD_CANNOT_DELETE_REQUIRED_FIELD:
FDO_E_NO_SCHEMA_LICENSE:
FDO_E_SE_DBMS_DOES_NOT_SUPPORT:
DeleteField removes the specified field from a table, object class or feature class. Fields that are required by the Geodatabase and cannot be removed include:
Prior to deleting a field from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.