title: error CS0116: A namespace cannot directly contain members such as fields or methods- hand writing coding using notepad
body: <p>Getting the error on line 16, with the foreach. My professor wont email fast enough and the due date is in a few hours! I think I am missing a list or something. I think the d after the double is incorrect. Any help is appectiated!</p>
  
  <pre><code>using System;
  using System.Windows.Forms;
  using System.Collections.Generic;
  
  public class Starbucks
  {
   public static void Main()
  {
   double[] x = {4.2, 5.7, 3.6, 9.1, 2.7, 8.4 };
   }
  }
  
  static void MyGenerics(double x)
  {
   foreach (double d in x)
   {
    MessageBox.Show(x);
   }
  }
  </code></pre>