AnsweredAssumed Answered

Feature Identity

Question asked by j.buchtaesri-de-esridist Employee on Jul 11, 2017
Latest reply on Jul 11, 2017 by minerjoe

This code fails, f1 and f2 are not considered to be equal:

var gdb = await Geodatabase.OpenAsync(@"mytest.geodatabase");
var ft = gdb.GeodatabaseFeatureTables.First();
var f1 = (await ft.QueryFeaturesAsync(new QueryParameters {WhereClause = "OBJECTID=1"})).Single();
var f2 = (await ft.QueryFeaturesAsync(new QueryParameters {WhereClause = "OBJECTID=1"})).Single();
Assert.AreEqual(f1, f2);


I really wonder, if this is intended behavior or not.


I'd say, it's really good that we are not getting the same object here, this helps avoiding memory leaks a lot. But shouldn't two objects of the same type with the same properties be considered equal?