I have some code in my VB2010 application:
Vessel1Shape = TryCast(VesselLayer.InternalFeatures(MMSI).GetShape(), PointShape)
at the moment if the particular point isn't there, I trap the error with Try/Catch and add it with:
VesselLayer.InternalFeatures.Add(MMSI, New Feature(Vessel1Shape))
However, this seems to be pretty slow and of course it's not good programming practice to be going through so many error traps every cycle of my application updating the map.
Is there some test I can do for the existence of the object in the layer without error trapping?
Thanks,
David