QueryFilter.SubFields的使用例子

///

        /// 获得Feature

        ///

        ///

        ///

        ///

        private string GetFeatureByFID(IFeatureClass pFeatureClass, int FID)

        {

 

            IQueryFilter pQueryFilter = new QueryFilterClass();

            pQueryFilter.WhereClause = pFeatureClass.OIDFieldName + "=" + FID;

            pQueryFilter.SubFields = "BSM";

            IFeatureCursor pFeatureCursor = pFeatureClass.Search(pQueryFilter, true);

            try

            {

                return pFeatureCursor.NextFeature().get_Value(0).ToString();

            }

            finally

            {

                System.Runtime.InteropServices.Marshal.ReleaseComObject(pFeatureCursor);

                System.Runtime.InteropServices.Marshal.ReleaseComObject(pQueryFilter);

            }

        }

你可能感兴趣的:(C#,ArcObjects)