ArcGIS Pro 2.8 API Reference Guide
CodedValueDomainDescription Constructor(String,FieldType,SortedList<Object,String>)
Example 

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.
Creates a description object of the ArcGIS.Core.Data.CodedValueDomain.
Syntax
public CodedValueDomainDescription( 
   string name,
   FieldType fieldType,
   SortedList<object,string> codedValuePairs
)
Public Function New( _
   ByVal name As String, _
   ByVal fieldType As FieldType, _
   ByVal codedValuePairs As SortedList(Of Object,String) _
)

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
ExceptionDescription

name is invalid.

fieldType is invalid. The only valid types are ArcGIS.Core.Data.FieldType.String, ArcGIS.Core.Data.FieldType.SmallInteger, ArcGIS.Core.Data.FieldType.Integer, ArcGIS.Core.Data.FieldType.Single, ArcGIS.Core.Data.FieldType.Double, and ArcGIS.Core.Data.FieldType.Date.

-or-

codedValuePairs must contain at least one coded value pair.

-or-

codedValuePairs contains invalid codes or values. The expected type for ArcGIS.Core.Data.FieldType.Date is System.DateTime. The expected type for ArcGIS.Core.Data.FieldType.SmallInteger and ArcGIS.Core.Data.FieldType.Integer is an integer. The expected type for ArcGIS.Core.Data.FieldType.Single and ArcGIS.Core.Data.FieldType.Double is a float.

codedValuePairs is null.
The System.DateTime code is representing a year earlier than the year 100 AD.
Example
// 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 10, Windows 8.1

See Also

Reference

CodedValueDomainDescription Class
CodedValueDomainDescription Members
Overload List