title: Error when binding WPF combobox ItemsSource to an Array of Strings
body: <p>I could not set a combobox's ItemsSource to an Array. I have tried setting the DataContext to the class where the Array is found, and then setting the bindings in XAML</p>
  
  <pre><code> class Car
  {
      public string[] makes;
  }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>public MainWindow()
  {
      Car _Car = new Car();
      _Car.makes = new string[]
          {
              "Toyota",
              "Mitsubishi",
              "Audi",
              "BMW"           
          };
  
      this.DataContext = _Car;
  }
  </code></pre>
  
  <p>and then in XAML</p>
  
  <pre><code>&lt;ComboBox Name="cars" Grid.Column="0" 
                Grid.Row="0" Margin="5" 
                ItemsSource="{Binding Path=makes}"/&gt;
  </code></pre>
  
  <p>It doesn't seem to do anything. My cars combobox won't have any items.</p>
  
  <p>I've also tried explicitly assigning</p>
  
  <pre><code>cars.ItemsSource= new string[]{
                  "Toyota",
                  "Mitsubishi",
                  "Audi",
                  "BMW"           
              };
  </code></pre>
  
  <p>But then I get this error message: </p>
  
  <blockquote>
    <p>Exception has been thrown by the target of an invocation.</p>
  </blockquote>
  
  <p>Is there anything I missed?</p>