This code fails, f1 and f2 are not considered to be equal:
<SPAN class="keyword token">var</SPAN> gdb <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">await</SPAN> Geodatabase<SPAN class="punctuation token">.</SPAN><SPAN class="token function">OpenAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">@"mytest.geodatabase"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> ft <SPAN class="operator token">=</SPAN> gdb<SPAN class="punctuation token">.</SPAN>GeodatabaseFeatureTables<SPAN class="punctuation token">.</SPAN><SPAN class="token function">First</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> f1 <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">await</SPAN> ft<SPAN class="punctuation token">.</SPAN><SPAN class="token function">QueryFeaturesAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">QueryParameters</SPAN> <SPAN class="punctuation token">{</SPAN>WhereClause <SPAN class="operator token">=</SPAN> <SPAN class="string token">"OBJECTID=1"</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">Single</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> f2 <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">await</SPAN> ft<SPAN class="punctuation token">.</SPAN><SPAN class="token function">QueryFeaturesAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">QueryParameters</SPAN> <SPAN class="punctuation token">{</SPAN>WhereClause <SPAN class="operator token">=</SPAN> <SPAN class="string token">"OBJECTID=1"</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">Single</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
Assert<SPAN class="punctuation token">.</SPAN><SPAN class="token function">AreEqual</SPAN><SPAN class="punctuation token">(</SPAN>f1<SPAN class="punctuation token">,</SPAN> f2<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>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?