ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data Namespace / Feature Class
Members Example

In This Topic
    Feature Class
    In This Topic
    Represents a feature in a FeatureClass.
    Object Model
    Feature ClassGeometry ClassFeatureClass Class
    Syntax
    public class Feature : Row, System.IDisposable  
    Public Class Feature 
       Inherits Row
       Implements System.IDisposable 
    Example
    Reading a Blob field
    public async Task ReadBlobField(Table table, QueryFilter queryFilter, string blobFieldName)
    {
      await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
      {
        const string imageFileBaseName = "C:\\path\\to\\image\\directory\\Image";
    
        // for each row that satisfies the search criteria, write the blob field out to an image file
        using (RowCursor rowCursor = table.Search(queryFilter))
        {
          int fileCount = 0;
          while (rowCursor.MoveNext())
          {
            using (Row row = rowCursor.Current)
            {
              // Read the blob field into a MemoryStream
              MemoryStream memoryStream = row[blobFieldName] as MemoryStream;
    
              // Create a file
              using (FileStream outputFile = new FileStream(imageFileBaseName + fileCount.ToString(), FileMode.Create, FileAccess.Write))
              {
                // Write the MemoryStream into the file
                memoryStream.WriteTo(outputFile);
              }
            }
          }
        }
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Row
             ArcGIS.Core.Data.Feature
                ArcGIS.Core.Data.Mapping.AnnotationFeature
                ArcGIS.Core.Data.Mapping.CatalogDatasetFeature
                ArcGIS.Core.Data.Mapping.DimensionFeature

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also