This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFieldsEdit Interface > IFieldsEdit.AddField Method (ArcObjects .NET 10.5 SDK) |
Add a field to the fields collection.
[Visual Basic .NET] Public Sub AddField ( _ ByVal Field As IField _ )
[C#] public void AddField ( IField Field );
[C++]
HRESULT AddField(
IField* Field
);
[C++]
Parameters Field [in]
Field is a parameter of type IField
AddField is used when creating a fields collection and cannot be used to insert a field into a fields collection belonging to an existing table. To add a field to an existing object class, use the IClass::AddField method.
The order in which fields are added to the fields collection will dictate their order in the database.