title: How would I call a method in a Console Application
body: <p>So I have a method and what it does is it gets the processor name of my PC basically..</p>
  
  <p>Now how would I do the same thing if I were to do it in a Console Application.</p>
  
  <p>This is what I tried but it didnt print out anything</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;    
  using System.Management;
  
  namespace testereeee
  {
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine("hello World");
              Console.ReadKey();
          }
  
          private string GetProcessorName()
          {
              string ProcessorName = "";
              ManagementObjectSearcher mos
              = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_Processor");
  
              foreach (ManagementObject mo in mos.Get())
                  ProcessorName = mo["Name"].ToString();
              Console.WriteLine(ProcessorName.ToString());
              return ProcessorName;
          }        
      }
  }
  </code></pre>