csharp79

IFeatureLayer from IFeatureClass

Discussion created by csharp79 on Aug 29, 2011
Latest reply on Aug 31, 2011 by madgame
Hi Forum,

how can obtain a IFeatureLayer from a IFeatureClass?

I have a FeatureClass:
IFeatureClass pTargetFeatureClass;
pTargetFeatureClass = GetFeatureClassFromShapefileOnDisk("c:\\", "feature_name");


How can get the FeatureLayer from that?
The follow code I think that is incorrect
IFeatureLayer pTargetFeatureLayer = pTargetFeatureClass as IFeatureLayer;


How can I do it?
Can you suggest me? Please?

Outcomes