title: Public void method not working. Cannot implicitly convert type 'void' to 'object'
body: <p>I've googled about but still haven't found what I'm looking for. What I want to happen is to get all the comments for a particular image that's been posted. </p>
  
  <pre><code>@model IEnumerable&lt;Project1.Models.Picture&gt;
  @{
      Layout = "~/Views/Shared/_PictureLayout.cshtml";
      ViewBag.Title = "Animal Pictures";    
  }
  @foreach (var picture in Model)
  {
      long id = picture.PictureID;
      &lt;div class="picture"&gt;
          @Html.ActionLink("Picture", "IndexPic", "Pictures", new { id = picture.PictureID        
  }, true)
          &lt;img src="" alt="@picture.File" /&gt;
               Posted by @Html.ActionLink(picture.GetUsername(picture.UserID), "Index",  
               "Pictures", new { username = picture.GetUsername(picture.UserID) }, true)
               at @picture.Posted
  
          @picture.GetComments(picture.PictureID)  **** HERE LIES THE PROBLEM!!!          
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>The error that is returned is <strong>Cannot implicitly convert type 'void' to 'object'</strong></p>
  
  <p>The plan was to get the pictures ID and pass it to a method which would then get all the comments for that picture</p>
  
  <pre><code>public void GetComments(long pictureID)
  {
      DBContext db = new DBContext();
      Picture picture = new Picture();
      //PictureComment comments = new PictureComment();
  
      var comments = from c in db.PictureComments
                     where pictureID == c.PictureID
                     orderby c.DateTime descending
                     select c;
  
      foreach (var comment in comments)
      {
          Console.WriteLine(picture.GetUsername(comment.UserID));
          Console.WriteLine(comment.Comment);
      }
  
  }
  </code></pre>
  
  <p>I thought at first it was to do with being in a foreach loop, however the <strong>picture.GetUsername()</strong> method works fine.</p>
  
  <p>Are there any SIMPLE work around, I say simple because I am new to c# and not aware of all the concepts/terminology. 
  Thanks.</p>