title: C# Call method By button
body: <pre><code>private void button1_Click(object sender, EventArgs e)
      {
          request;
      }
  </code></pre>
  <p>This is the error I get:</p>
  <pre><code>Error CS0201 Entrance, Call, Increase, Decrease, and New Object Expression can only be used as statements.
  </code></pre>
  <p>How can I call the request method and fix this?</p>
  <pre><code>   private void request(object sender, EventArgs e)
      {
          var httpWebRequest = (HttpWebRequest)WebRequest.Create(&quot;http://crest-safe.azurewebsites.net/users/checkpayment/vouchers?token=mainBackup&amp;apiKey=pds3583e&quot;);
          httpWebRequest.ContentType = &quot;application/json&quot;;
          httpWebRequest.Method = &quot;POST&quot;;
          using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
          {
              string json = JsonConvert.SerializeObject(new User(&quot;cultureLand&quot;, pin));
              streamWriter.Write(json);
          }
      }
  </code></pre>