title: What does this error mean: Member modifier 'public' must precede the member type and name
body: <p>I have a problem with my viewresult for my index page. I have searched here and on Google for the solution. So here is my code.</p>
  
  <pre><code>public class UserController : Controller
  {
      private ProjectsDB db = new ProjectsDB();
      //
      // GET: /User/
      EnvironmentVariableTarget 
  
      public ViewResult Index()
      {
          var model = from p in db.Projects where p.UserName == User.Identity.Name select p;
          return View(model);
      }
  </code></pre>
  
  <p>And this is my error:</p>
  
  <blockquote>
    <p>Member modifier 'public' must precede the member type and name.</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>