title: “does not contain a definition…and no extension method..” error
body: <p>I am having an issue whereby I cannot use an objects method because of this error:</p>
  
  <blockquote>
    <p>Does not contain a definition...and no extension method...</p>
  </blockquote>
  
  <p>It is very related to this <a href="https://stackoverflow.com/questions/7178151/does-not-contain-a-definition-and-no-extension-method-error">question</a>. I am doing what is given as the answer in that question, but I am still getting this error. </p>
  
  <pre><code>namespace MyProject.ViewModel
  {
      public class NetworkHealthViewModel : ViewModelBase
      {
          private IDataService _dataService;
          public ObservableCollection&lt;NetworkBandwidthModel&gt; NbicNetworkBandwidth
          public ObservableCollection&lt;NetworkPortalStatusModel&gt; NbicNetworkPortalStatus
  
          public NetworkHealthViewModel()
          {
              _dataService = new DataServiceNetworkHealth();
              NbicNetworkBandwidth       = new ObservableCollection&lt;NetworkBandwidthModel&gt;();
              NbicNetworkPortalStatus    = new ObservableCollection&lt;NetworkPortalStatusModel&gt;();
              _dataService.LoadChartItems(NetworkBandwidthLoaded, NetworkBandwidthLoadedFailed);
              _dataService.LoadPortalStatus(NetworkPortalStatusLoaded, NetworkPortalStatusLoadedFailed);
           }
  </code></pre>
  
  <p>The error lies at LoadPortalStatus(). LoadChartItems() is fine. NetworkBandwidthLoaded and NetworkPortalStatusLoaded are delegates.  </p>
  
  <p>NetworkPortalStatusLoaded is laid out pretty much the same as NetworkBandwidthLoaded:</p>
  
  <pre><code>private void NetworkPortalStatusLoaded(IEnumerable&lt;ChartModel&gt; portalStatItems) 
  {
      NbicNetworkPortalStatus.Clear();
  
      var networkPortalItems = from item in portalStatItems
                               where ((NetworkPortalStatusModel)item).Unit == "Portal"
                               select item;
  
      foreach (var item in networkPortalItems)
      {
          NbicNetworkPortalStatus.Add((NetworkPortalStatusModel)item);
      }
  
      Message = "Network Portal details loaded";
  }
  </code></pre>
  
  <p>My DataServiceNetworkHealth class is defined as:</p>
  
  <pre><code>namespace MyProject.DataServices
  {
      public class DataServiceNetworkHealth : IDataService
      {
          private Action&lt;IEnumerable&lt;ChartModel&gt;&gt; _delagateSuccess;
          private Action&lt;Exception&gt; _delagateFail;
          private String _portalHtmlResponse;
  
          public void LoadChartItems(Action&lt;IEnumerable&lt;ChartModel&gt;&gt; success, Action&lt;Exception&gt; fail)
          {
            ....
          }
  
          public void LoadPortalStatus(Action&lt;IEnumerable&lt;ChartModel&gt;&gt; success, Action&lt;Exception&gt; fail)
          {
            ....
          }
      }
  }
  </code></pre>
  
  <p>Method LoadChartItems() is defined in the interface IDataService, but LoadPortalStatus is not. Perhaps that's where the problem lies. There are other DataServiceX classes that do not use LoadPortalStatus.</p>
  
  <p>I know this is a long post, but I thought better to give all info up front. :-)  Thanks for any help!</p>