When I create a feature I either specify an Feature ID or Map Suite assigns one for me. Examples would be
Dim tempFeature As Feature = New Feature(tempMultiPolygon, "12345") ' results in a feature with an id of "12345"
Dim tempFeature As Feature = New Feature(tempMultiPolygon, "taco") ' results in a feature with an id of "taco"
Dim tempFeature As Feature = New Feature(tempMultiPolygon) ' results in a feature with an id that appears to be a GUID
If I attempt to use any of these IDs with Layer.QueryTools.GetFeatureByID or Layer.FeatureSource.GetFeatureByID, I receive an error message. It appears that what GetFeatureByID is expecting when querying a Shapefile is a record number and therefore if the value is not able to be parsed as an integer a FormatException is thrown and if the value is able to be parsed as an integer but isn't in between 0 and the number of records in the Shapefile-1 (inclusive) an ArgumentOutOfRange exception is thrown.
My question is - what is an efficient way to query a Shapefile for a particular record/feature when what one knows is the Feature.Id?