title: Invoking a method thtough C#
body: <p>I am trying to get some data from the UWF_Volume WMI provider. Please see the following link,</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/jj979756(v=winembedded.81).aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/jj979756(v=winembedded.81).aspx</a></p>
  
  <p>More specifically I am trying to get the exclusion files using the following class,</p>
  
  <pre><code>UInt32 GetExclusions([out, EmbeddedInstance("UWF_ExcludedFile")] string ExcludedFiles[]);
  </code></pre>
  
  <p>I am not familiar with out parameters but from a research I can understand that acts as a reference argument. So I wrote the following method,</p>
  
  <pre><code>public void getUWFExclusions()
      {
          {
              string computer = ".";
  
              ManagementScope scope = new ManagementScope(@"\\" + computer + @"\root\standardcimv2\embedded");
  
              ManagementClass cls = new ManagementClass(scope.Path.Path, "UWF_Volume", null);
  
  
              foreach (MethodData m in cls.Methods)
  
              {
                  richTextBox1.AppendText("The class contains this method:" + m.Name + "\n");
              }
  
              ManagementBaseObject outParams;
  
              foreach (ManagementObject mo in cls.GetInstances())
              {
                  outParams = mo.InvokeMethod("GetExclusions", null, null);
                  richtextbox1.appendtext(string.format("ExcludedFiles" + mo[ExcludedFiles]));
              }
  
          }
  
          catch (Exception e)
          {
              richTextBox1.AppendText(e.ToString());
          }
  
      }
  </code></pre>
  
  <p>The problem is that the line,</p>
  
  <pre><code>                richtextbox1.appendtext(string.format("ExcludedFiles" + mo[ExcludedFiles]));
  </code></pre>
  
  <p>returns "Not Found"</p>
  
  <p>I appreciate any help to debug this problem.</p>