Show / Hide Table of Contents

Method GetFields

GetFields(long)

The collection of Field objects for features created with this template.

Declaration
public IReadOnlyList<Field> GetFields(long layerId)
Parameters
Type Name Description
long layerId

An ID that identifies the layer for which the fields are requested.

Returns
Type Description
IReadOnlyList<Field>

The collection of Field objects for this template.

Remarks

Use this to determine how to display or convert attribute values into the proper data type and whether they are required by the template.

The fields returned are from the specified layer's definition, provided this layer is loaded and is one of the LayerIds. They may also be from field overrides from the layer's subtype matching this template's subtype if available.

Exceptions
Type Condition
ArgumentException

The specified layerId is not one of the LayerIds or is not loaded.

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300
In this article
Provide feedback
Back to top Copyright © 2025 Esri.