title: Working with methods and return values in classes
body: <p>Maybe this is a very silly question but it's been a long time I worked with VS.</p>
  <p>I'm trying to figure out how I can call a method/function from inside my program e.g. by pressing a button. But the method is written in <code>Class1.cs</code>. I show below what I'm trying but I know this is completely wrong:</p>
  <pre><code>namespace TestProject1
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
               InitializeComponent();
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              AddingNumbers(3, 5);
              label1.Text = Result;
          }
      }
  }
  </code></pre>
  <p>And in <code>Class1.cs</code> I have something like this:</p>
  <pre><code>namespace TestProject1
  {
      class Class1
      {
          public static AddingNumbers(int num1, int num2)
          {
              return num1 + num2;
          }
      }
  }
  </code></pre>
  <p>If someone could help me understand this I would really appreciate. I don't need a full answer because then I won't learn anything.</p>
  <p>I think it has to do with Public, Static, Void or something like this. I have tried to understand how this principle works by reading on MSDN but I don't grasp it for now.</p>
  <p>Advice would be appreciated</p>