title: How to read ManagementObject Collection in WMI using C#
body: <p>I found a code on net and have been trying to get more information about <strong>mo[]</strong>.</p>
  
  <p>I am trying to get all the information contained in ManagementObjectCollection.</p>
  
  <p>Since parameter in <strong>mo</strong> is looking for an string value which I dont know, how can I get all the values without knowing its parameter values. Or if I want to get all the indexer values related to mo in <code>ManagementObjectCollection</code></p>
  
  <pre><code>ManagementObjectSearcher objOSDetails = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem");
  ManagementObjectCollection osDetailsCollection = objOSDetails.Get();
  
  foreach( ManagementObject mo in osDetailsCollection )
  { 
     _osName  = mo["name"].ToString();// what other fields are there other than name
     _osVesion = mo["version"].ToString();
     _loginName = mo["csname"].ToString();
  }
  </code></pre>