合聚咖

合聚咖

C#-ArcEngine 图层属性查询的部分代码

admin

首先as是类型转换的意思,是引用类型的显示转换,一楼说的很详细了。

ILayer、IFeatureLayer、IFeatureClass 、IFeatureCursor都不是普通类,你见过类前面有I吗??呵呵,这些都是接口,把msdn上ILayer的介绍你看下:

Provides access to members that work with all layers. Note: the ILayer interface has been superseded by ILayer2. Please consider using the more recent version.

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

ILayer is a generic interface for all layer objects. This interface has a method to draw the layer and provides access to generic layer properties.

建议多看看msdn吧。

这几句话的意思,楼上说的也都差不多了,我就不补充了。