Error: A namespace cannot directly contain members such as fields or methods
<p>I'm new to C# and I'm having trouble solving this error can anyone help me please? This script is to delete an un-needed shortcut then install a new program if it hasn't been installed already.</p>

<pre><code>using System;
using WindowsInstaller;


string startMenuDir = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
string shortcutold = Path.Combine(startMenuDir, @"Ohal\TV AMP (Windows XP Mode).lnk");
if (File.Exists(shortcutold))
File.Delete(shortcutold);


string startMenuDir = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
string shortcut = Path.Combine(startMenuDir, @"Ohal\TV AMP.lnk");
if (File.Exists(shortcut))
{
    Console.WriteLine("Already installed...");
}
else
{
Type type = Type.GetTypeFromProgID("WindowsInstaller.Installer");
            Installer installer = (Installer)Activator.CreateInstance(type);
            installer.InstallProduct(@"Y:\LibSetup\TVAMP313\TVAmp v3.13.msi");
}
</code></pre>
