Killing A Process in C#
<p>So I'm just trying to explore the intricacies of C# and I wanted to make a simple program that would just kill a process. Yes I know, that is what Task Manager is for but this is supposed to be a learning experience, this is what I have so far.</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace endProcess
{
    class Program
    {

        private Process GetaProcess(string processname)
        {
            Process[] aProc = Process.GetProcessesByName(processname);

            if (aProc.Length &gt; 0)
                return aProc[0];

            else return null;
        }
        string selectProcess = "";
        static void Main(string[] args)
        {
            Console.WriteLine("What process do you want to kill?");
            selectProcess = Console.ReadLine();
            Process myprc = Call GetAProcess(selectProcess);
            myprc.Kill();
            Console.ReadLine();
        }
    }
}
</code></pre>

<p>The issue comes where I made the comment. It says there should be a semicolon after GetAProcess and I have no idea why. Any help would be much appreciated.</p>
