ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Data Namespace / Field Class / AliasName Property
Example

In This Topic
    AliasName Property (Field)
    In This Topic
    Gets the alias name of the field.
    Syntax
    public string AliasName {get;}
    Public ReadOnly Property AliasName As String
    Example
    Adding indexes in pre-existing dataset
    {
      Task AddingIndexesAsync(SchemaBuilder schemaBuilder, FeatureClassDefinition featureClassDefinition) => QueuedTask.Run(() =>
      {
        // Field names to add in the attribute index
        string fieldName = featureClassDefinition.GetFields().First(f => f.AliasName.Contains("Name")).Name;
        string fieldAddress = featureClassDefinition.GetFields().First(f => f.AliasName.Contains("Address")).Name;
    
        // Creating an attribute index with index name 'Idx' and two participating fields' name
        AttributeIndexDescription attributeIndexDescription = new AttributeIndexDescription("Idx",
          new TableDescription(featureClassDefinition), new List<string> { fieldName, fieldAddress });
    
        // Enqueue DDL operation for an attribute index creation
        schemaBuilder.Create(attributeIndexDescription);
    
        // Creating the spatial index
        SpatialIndexDescription spatialIndexDescription = new SpatialIndexDescription(new FeatureClassDescription(featureClassDefinition));
    
        // Enqueue DDL operation for the spatial index creation
        schemaBuilder.Create(spatialIndexDescription);
    
        // Execute build indexes operation
        bool isBuildSuccess = schemaBuilder.Build();
    
        if (!isBuildSuccess)
        {
          IReadOnlyList<string> errors = schemaBuilder.ErrorMessages;
          // Iterate and handle errors
        }
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also