Question: how can I do this? Basically I want to store RGB color values that can be retrieved in response to a color name. My C++ code uses boost unordered\_map to do this:

```
("SlateBlue1", Color(0.5137f, 0.4353f,1.0f)) 
("tan3", Color(0.8039f, 0.5216f, 0.2471f)) 
("grey32", Color(0.3216f, 0.3216f, 0.3216f))

```

Color is a class that stores the 3 values.
Trying to do this in Objective-C is tying me up in knots and weird errors! Most of the dictionary examples I've found are simply matching 2 strings. Of course I can just use the C++ code in a .mm file, but if anyone has any ideas how to achieve this the Obj-C way, I'd be pleased to learn, thanks.

Answer: 
If I use this code:

```
  public void Run()
  {
      string fileToLoad = this.GetType().Name + ".xml";

      XElement root = XElement.Load(fileToLoad);

      var selected = from cli in root.Elements("client")
          where cli.Element("ID").Value == "1"
          select cli;

      System.Console.WriteLine("Selected:");
      foreach (var d in selected)
          Console.WriteLine("{0}", d.ToString());

      System.Console.WriteLine("\nitems:");
      foreach (var d in selected)
      {
          Console.WriteLine("id: {0}", d.Element("ID"));
      }
  }

```

And this source data: 

```
<root>
  <client>
    <ID>1</ID>
    <name>Andrej</name>
  </client>
  <client>
    <ID>2</ID>
    <name>William</name>
  </client>
  <client>
    <ID>3</ID>
    <name>Kate</name>
  </client>
</root>

```

Then... I get this result:

```
Selected:
<client>
  <ID>1</ID>
  <name>Andrej</name>
</client>

items:
id: <ID>1</ID>

```
you could do it in one statement. I'm paraphrasing your statement. Only the select really changes.

```
    var nameIdList = (from cli in client
where cli.ID == ID
select new { id=cli.ID, name=cli.name }).ToList();

```