The collection of fields in a
Feature.
Object Model
Syntax
| Visual Basic (Declaration) | |
|---|
<ComVisibleAttribute(False)>
<DefaultMemberAttribute("Item")>
Public NotInheritable Class FieldCollection |
| C# | |
|---|
[ComVisibleAttribute(false)]
[DefaultMemberAttribute("Item")]
public sealed class FieldCollection |
Example
An example of accessing the
FieldCollection of a
Feature. This example assumes there is a variable MyLocalVectorLayer pointing to a
LocalVectorLayer (e.g. Shapefile).
| C# | Copy Code |
|---|
ESRI.ArcGIS.E2API.FeatureSet MyFeatureSet = MyLocalVectorLayer.QueryFeatures(null, string.Empty,esriE2SpatialRelationship.Undefined ); ESRI.ArcGIS.E2API.Feature MyFeature = MyFeatureSet.GetFeature(0); FieldCollection MyFieldCollection = MyFeature.Fields; int i = 0; do { ESRI.ArcGIS.E2API.Field MyField = MyFieldCollection.GetField(i); _taskUI.E2.MessageBox(MyField.FieldName,"Message Box",esriE2MessageBoxType.Information); i++; }while(i != MyFieldCollection.Count); |
| Visual Basic | Copy Code |
|---|
Dim MyFeatureSet As ESRI.ArcGIS.E2API.FeatureSet = MyLocalVectorLayer.QueryFeatures(Nothing, _
String.Empty,esriE2SpatialRelationship.Undefined)
Dim MyFeature As ESRI.ArcGIS.E2API.Feature = MyFeatureSet.GetFeature(0)
Dim MyFieldCollection As FieldCollection = MyFeature.Fields
Dim i As Integer
For i = 0 To MyFieldCollection.Count - 1 Step i + 1
Dim MyField As ESRI.ArcGIS.E2API.Field = MyFieldCollection.GetField(i)
_taskUI.E2.MessageBox(MyField.FieldName,"Message Box",esriE2MessageBoxType.Information)
Next |
Inheritance Hierarchy
System.Object
ESRI.ArcGIS.E2API.FieldCollection
Platforms
Version Information
This class was added to the E2API at version 1.0.0.348.
See Also