title: cannot convert from 'method group' to 'bool' in a Razor Page
body: <p>While trying to Build a public Repo of a Blazor Blog Engine in VS2019 for Mac I encounter the following compile Error and don't know why and how to solve it:</p>
  
  <blockquote>
    <p>Error CS1503: Argument 3: cannot convert from 'method group' to
    'bool' (CS1503)</p>
  </blockquote>
  
  <p>In the following Razor Page:</p>
  
  <pre><code>@layout MainLayout
  @inherits LoginModel
  
  &lt;WdHeader Heading="WordDaze" SubHeading="Please Enter Your Login Details"&gt;&lt;/WdHeader&gt;
  
  &lt;div class="container"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-md-4 offset-md-4"&gt;
          &lt;div class="editor"&gt;
              @if (ShowLoginFailed)
              {
                  &lt;div class="alert alert-danger"&gt;
                      Login attempt failed.
                  &lt;/div&gt;
              }
              &lt;input type="text" @bind=@LoginDetails.Username placeholder="Username" class="form-control" /&gt;
              &lt;input type="password" @bind=@LoginDetails.Password placeholder="Password" class="form-control" /&gt;
              &lt;button class="btn btn-primary" @onclick="@Login"&gt;Login&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>The CS File looks like this:</p>
  
  <pre><code>using System.Net.Http;
  using System.Threading.Tasks;
  using Microsoft.AspNetCore.Components;
  using WordDaze.Shared;
  
  
  namespace WordDaze.Client.Features.Login
  {
      public class LoginModel : ComponentBase
      {
          [Inject] private AppState _appState { get; set; }
          [Inject] private NavigationManager _navigationManager { get; set; }
  
          protected LoginDetails LoginDetails { get; set; } = new LoginDetails();
          protected bool ShowLoginFailed { get; set; }
  
          protected async Task Login()
          {
              await _appState.Login(LoginDetails);
  
              if (_appState.IsLoggedIn)
              {
                  _navigationManager.NavigateTo("/");
              }
              else
              {
                  ShowLoginFailed = true;
              }
          }
      }
  }
  </code></pre>
  
  <p>Can you please explain me why this happens and how to solve it?</p>
  
  <p>Solution:</p>
  
  <pre><code>&lt;button class="btn btn-primary" @onclick="@Login"&gt;Login&lt;/button&gt;
  </code></pre>
  
  <p>was missing the Parentheses of the Login Method:</p>
  
  <pre><code>&lt;button class="btn btn-primary" @onclick="@Login()"&gt;Login&lt;/button&gt;
  </code></pre>