ArcGIS Pro 2.9 API Reference Guide
TableDescription Constructor(String,IReadOnlyList<FieldDescription>)
Example 

ArcGIS.Core.Data.DDL Namespace > TableDescription Class > TableDescription Constructor : TableDescription Constructor(String,IReadOnlyList<FieldDescription>)
The name of the description.
The list of fields for the ArcGIS.Core.Data.Table.
Creates a description object of the ArcGIS.Core.Data.Table.
Syntax

Parameters

name
The name of the description.
fieldDescriptions
The list of fields for the ArcGIS.Core.Data.Table.
Exceptions
ExceptionDescription
name and/or fieldDescriptions is invalid.
fieldDescriptions is null.
Example
// Create a PoleInspection table with the following fields
//  GlobalID
//  ObjectID
//  InspectionDate (date)
//  InspectionResults (pre-existing InspectionResults coded value domain)
//  InspectionNotes (string)

// 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();

// Create a FieldDescription for the InspectionDate field
FieldDescription inspectionDateFieldDescription = new FieldDescription("InspectionDate", FieldType.Date)
{
  AliasName = "Inspection Date"
};

// This static helper routine creates a FieldDescription for a Domain field (from a pre-existing domain)
FieldDescription inspectionResultsFieldDescription = FieldDescription.CreateDomainField("InspectionResults", new CodedValueDomainDescription(inspectionResultsDomain));
inspectionResultsFieldDescription.AliasName = "Inspection Results";

// This static helper routine creates a FieldDescription for a string field
FieldDescription inspectionNotesFieldDescription = FieldDescription.CreateStringField("InspectionNotes", 512);
inspectionNotesFieldDescription.AliasName = "Inspection Notes";

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

// Create a TableDescription object to describe the table to create
TableDescription tableDescription = new TableDescription("PoleInspection", fieldDescriptions);

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

// Add the creation of PoleInspection to our list of DDL tasks
schemaBuilder.Create(tableDescription);

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

// Inspect error messages
if (!success)
{
  IReadOnlyList<string> errorMessages = schemaBuilder.ErrorMessages;
  //etc.
}
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

TableDescription Class
TableDescription Members
Overload List