title: C# console application - commission calculator - how to use method within method
body: <p>I'm new to C# and I have encountered some problems with my console application that I'm recently working on. I am trying to have 3 methods: </p>
  
  <p><code>getsales</code> to get the sales the user made, <code>calcCom</code> to calculate the commission for the sales and finally <code>main</code> to make them work and establish the program. </p>
  
  <p>I'm having trouble to make those methods work with(in) each other. </p>
  
  <p>After i entered all the sales, the program goes to the else-statement and tells me "invalid entry". Since i haven't really gotten to output the variables I didn't expect any kind of output, but I want the program to tell the user the commission and sale for each person.</p>
  
  <p>Please excuse me if I misused any terms or words, like I said I am new to this language! :D</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace ConsoleApplication38
  {
  class Program
  {
  
      public static void getsales ()
      {
          string inputsales;
          double total = 0;
          double sale = 0;
  
          for (int salecount = 1; salecount &lt;= 3; ++salecount)
          {
  
              Console.WriteLine("Enter sale: ");
              inputsales = Console.ReadLine();
              sale = Convert.ToDouble(inputsales);
              total = total + sale;
              Console.WriteLine();
          }
      }
  
      public static void calcComm ()
      {
          double total = 0;
          double comm = 0;
          comm = total * 0.2;
  
      }
  
  
      static void Main()
      {
          Console.WriteLine("           Sunshine Hot Tubs \n        Sales Commissions Report\n");
          char Letter;
          string name;
          const string name1 = "Andreas";
          const string name2 = "Brittany";
          const string name3 = "Eric";
          string inputLetter;
  
          Console.WriteLine("Please enter intial or type z to quit");
  
          inputLetter = Console.ReadLine();
          Letter = Convert.ToChar(inputLetter);
  
  
  
          while (Letter != 'z')
          {
  
              if (Letter == 'a')
              {
                  name = name1;
                  getsales();
                  calcComm();
              }
                 if (Letter == 'b')
                 {
                     name = name2;
                     getsales();
                     calcComm();
                 }
                     if (Letter == 'e')
                     {
                         name = name3;
                         getsales();
                         calcComm();
                     }
  
                     else
                     {
  
                        Console.WriteLine("Invalid entry try again");
                        inputLetter = Console.ReadLine();
  
                     }
  
  
          }
      }
   }
  }
  </code></pre>