ArcGIS Pro 2.8 API Reference Guide
FieldDescription Constructor(String,FieldType)
Example 

ArcGIS.Core.Data.DDL Namespace > FieldDescription Class > FieldDescription Constructor : FieldDescription Constructor(String,FieldType)
The name of the description.
The ArcGIS.Core.Data.FieldType for the ArcGIS.Core.Data.Field.
Creates a description object of the ArcGIS.Core.Data.Field.
Syntax
public FieldDescription( 
   string name,
   FieldType fieldType
)
Public Function New( _
   ByVal name As String, _
   ByVal fieldType As FieldType _
)

Parameters

name
The name of the description.
fieldType
The ArcGIS.Core.Data.FieldType for the ArcGIS.Core.Data.Field.
Exceptions
ExceptionDescription
name and/or fieldType is invalid.
Example
// Create a Cities feature class with the following fields
//  GlobalID
//  ObjectID
//  Name (string)
//  Population (integer)

// This static helper routine creates a FieldDescription for a GlobalID field with default values
FieldDescription globalIDFieldDescription = FieldDescription.CreateGlobalIDField();

// This static helper routine creates a FieldDescription for an ObjectID field with default values
FieldDescription objectIDFieldDescription = FieldDescription.CreateObjectIDField();

// This static helper routine creates a FieldDescription for a string field
FieldDescription nameFieldDescription = FieldDescription.CreateStringField("Name", 255);

// This static helper routine creates a FieldDescription for an integer field
FieldDescription populationFieldDescription = FieldDescription.CreateIntegerField("Population");

// Assemble a list of all of our field descriptions
List<FieldDescription> fieldDescriptions = new List<FieldDescription>()
  { globalIDFieldDescription, objectIDFieldDescription, nameFieldDescription, populationFieldDescription };

// Create a ShapeDescription object
ShapeDescription shapeDescription = new ShapeDescription(GeometryType.Point, spatialReference);

// Alternately, ShapeDescriptions can be created from another feature class.  In this case, the new feature class will inherit the same shape properties of the existing class
ShapeDescription alternateShapeDescription = new ShapeDescription(existingFeatureClass.GetDefinition());

// Create a FeatureClassDescription object to describe the feature class to create
FeatureClassDescription featureClassDescription = new FeatureClassDescription("Cities", fieldDescriptions, shapeDescription);

// Create a SchemaBuilder object
SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);

// Add the creation of the Cities feature class to our list of DDL tasks
schemaBuilder.Create(featureClassDescription);

// Execute the DDL
bool success = schemaBuilder.Build();

// Inspect error messages
if (!success)
{
  IReadOnlyList<string> errorMessages = schemaBuilder.ErrorMessages;
  //etc.
}
// Creating a FeatureDataset named as 'Parcel_Information' and a FeatureClass with name 'Parcels' in one operation

string featureDatasetName = "Parcel_Information";
string featureClassName = "Parcels";

SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);

// Create a FeatureDataset token
FeatureDatasetDescription featureDatasetDescription = new FeatureDatasetDescription(featureDatasetName, SpatialReferences.WGS84);
FeatureDatasetToken featureDatasetToken = schemaBuilder.Create(featureDatasetDescription);

// Create a FeatureClass description
FeatureClassDescription featureClassDescription = new FeatureClassDescription(featureClassName, 
  new List<FieldDescription>()
  {
    new FieldDescription("Id", FieldType.Integer),
    new FieldDescription("Address", FieldType.String)
  }, 
  new ShapeDescription(GeometryType.Point, SpatialReferences.WGS84));

  // Create a FeatureClass inside a FeatureDataset
  FeatureClassToken featureClassToken = schemaBuilder.Create(new FeatureDatasetDescription(featureDatasetToken), featureClassDescription);

  // Build status
  bool buildStatus = schemaBuilder.Build();

  // Build errors
  if (!buildStatus)
  {
    IReadOnlyList<string> errors = schemaBuilder.ErrorMessages;
  }
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

FieldDescription Class
FieldDescription Members
Overload List