ArcGIS Pro 2.8 API Reference Guide
Create(RangeDomainDescription) Method
Example 

ArcGIS.Core.Data.DDL Namespace > SchemaBuilder Class > Create Method : Create(RangeDomainDescription) Method
Indicates the ArcGIS.Core.Data.RangeDomain to be created.
Enqueue the create operation on the object referred to by the RangeDomainDescription.
Syntax

Parameters

rangeDomainDescription
Indicates the ArcGIS.Core.Data.RangeDomain to be created.

Return Value

Exceptions
ExceptionDescription
For Enterprise geodatabases, ArcGIS.Core.Data.FieldType.Single is invalid for domains. Consider using ArcGIS.Core.Data.FieldType.Double instead.
rangeDomainDescription is null.
Example
     
// Create a range description with minimum value = 0 and maximum value = 1000
RangeDomainDescription rangeDomainDescriptionMinMax = new RangeDomainDescription("RangeDomain_0_1000", 
  FieldType.Integer, 0, 1000) 
  { Description = "Domain value ranges from 0 to 1000" };

SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);

// Create  a range domain 
schemaBuilder.Create(rangeDomainDescriptionMinMax); 
schemaBuilder.Build();
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

SchemaBuilder Class
SchemaBuilder Members
Overload List