I am trying to determine on the fly what type of shape a feature layer includes. I also want to check for duplicate column names, because that has caused us issues in the past.
Currently I do something relatively ugly and loop through the features, grab the first valid one, check it's shape type and do layer.FeatureSource.GetColumns() to determine if it has any duplicate columns.
This code is pretty old; I'm wondering if there is a simpler way to do this? Is there a way to access the shape type directly from the layer or featuresource?
I think for ShapeFileFeatureLayer, the GetShapeFileType will be much faster than the GetFirstFeturesWellKnownType, because the latter API will get all the features first.
About the duplicate columns, I suggest you using the GetColumns API and check the returning columns.