<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Find graphic by Attribute in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/find-graphic-by-attribute/m-p/462417#M5718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use Linq to query the Graphics collection for Graphics with attribute ["Id"] which match the specified value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 08:26:46 GMT</pubDate>
    <dc:creator>MichaelBranscomb</dc:creator>
    <dc:date>2015-05-26T08:26:46Z</dc:date>
    <item>
      <title>Find graphic by Attribute</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/find-graphic-by-attribute/m-p/462416#M5717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have a collection of graphics, I've added an attribute called "Id" for each graphic.&lt;/P&gt;&lt;P&gt;What would be the best way to find a graphic by its Id?&lt;/P&gt;&lt;P&gt;Do I have to iterate all the collection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 17:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/find-graphic-by-attribute/m-p/462416#M5717</guid>
      <dc:creator>PeterBennett</dc:creator>
      <dc:date>2015-05-25T17:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Find graphic by Attribute</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/find-graphic-by-attribute/m-p/462417#M5718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use Linq to query the Graphics collection for Graphics with attribute ["Id"] which match the specified value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 08:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/find-graphic-by-attribute/m-p/462417#M5718</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2015-05-26T08:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Find graphic by Attribute</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/find-graphic-by-attribute/m-p/462418#M5719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this should work ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var graphics = new GraphicCollection();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;graphics = // your code here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int interestingId = 1;&lt;/P&gt;&lt;P&gt;var interestingGraphic = graphics.FirstOrDefault( g =&amp;gt;&amp;nbsp; (int) g.Attributes["Id"] == interestingId);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 17:47:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/find-graphic-by-attribute/m-p/462418#M5719</guid>
      <dc:creator>KeithGemeinhart</dc:creator>
      <dc:date>2015-06-03T17:47:21Z</dc:date>
    </item>
  </channel>
</rss>

