ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / CodedValueDomainDescription Class / CodedValueDomainDescription Constructor / CodedValueDomainDescription Constructor(String,FieldType,SortedList<Object,String>)
The name of the description.
The ArcGIS.Core.Data.FieldType of the description.
The coded value pairs of the description.
Example

CodedValueDomainDescription Constructor(String,FieldType,SortedList<Object,String>)
Creates a description object of the ArcGIS.Core.Data.CodedValueDomain.
Syntax
public CodedValueDomainDescription( 
   string name,
   FieldType fieldType,
   SortedList<object,string> codedValuePairs
)

Parameters

name
The name of the description.
fieldType
The ArcGIS.Core.Data.FieldType of the description.
codedValuePairs
The coded value pairs of the description.
Exceptions
Example
Creating a CodedValue domain
// Create a CodedValueDomain description for water pipes
CodedValueDomainDescription codedValueDomainDescription = new CodedValueDomainDescription("WaterPipeTypes", FieldType.String,
  new SortedList<object, string> { { "Copper", "C_1" },
    { "Steel", "S_2" } })
{
  SplitPolicy = SplitPolicy.Duplicate,
  MergePolicy = MergePolicy.DefaultValue
};

SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);

// Create a coded value domain 
CodedValueDomainToken codedValueDomainToken = schemaBuilder.Create(codedValueDomainDescription);
schemaBuilder.Build();
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 2.8 or higher.
See Also