Returns the column collection representing attribute fields in a feature layer.
Syntax
Example
Assuming you have a feature layer in the map control (map1) and you are interested
in finding the index of a known column or field. you can use the code below.
C# | Copy Code |
---|
FeatureLayer fl = map1.MapLayers[0].Layer as FeatureLayer; if (fl == null) return; System.Diagnostics.Debug.Print(Fl.Columns.IndexOf("myfield").ToString()); //To see the column name of the first one in the collection System.Diagnostics.Debug.Print(Fl.Columns[0].ColumnName); |
Remarks
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also