title: Cannot implicitly convert type 'void' to 'object' MVC cshtml method call
body: <p>I'm having some some problem calling a simple method from a cshtml file in a Mvc-Project. This is the code that is givnng me the error: </p>
  
  <pre><code>@{
  var chatHub = new TestClass();
  }
  @chatHub.TestMethod();
  </code></pre>
  
  <p>It's the "@chatHub.TestMethod();" that's givning me the "Cannot implicitly convert type 'void' to 'object'" error.</p>
  
  <p>This is TestMethod:</p>
  
  <pre><code>public void TestMethod()
          {
              ChatHub test = new ChatHub();
              //var context = GlobalHost.ConnectionManager.GetHubContext&lt;ChatHub&gt;();
              test.JoinGrupprum1();
          }
  </code></pre>
  
  <p>And this is Joingrupprum1:</p>
  
  <pre><code>public void JoinGrupprum1()
          {
              Groups.Add(Context.ConnectionId, "Grupprum1");
          }
  </code></pre>
  
  <p>Any idea what's the problem?</p>