房天下 > 房天下问答 > 业主生活 > 其他
  • C#-ArcEngine 图层属性查询的部分代码

    private AxMapControl m_MapCtl;ILayer pLayer=m_MapCtl.get_Layer(0); IFeatureLayer pFLayer=pLayer as IFeatureLayer;//as 起到什么作用? IFeatureClass pFC = pFLayer.FeatureClass; IFeatureCursor pFCursor = pFC.Search(null, false);这几句话中ILayer、IFeatureLayer、IFeatureClass 、IFeatureCursor都是普通类吗?他们之间有什么联系吗?这几句话都是什么意思?希望大侠们给个注释把!!

    提问者:taiheguoyi

    发布于2010-12-17

共1个回答
  • SSL财富在线 丨Lv 0
    首先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.DescriptionILayer 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吧。这几句话的意思,楼上说的也都差不多了,我就不补充了。
    +11 2010-12-17 举报
热门人气推荐
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。