Global Variables in C#
<p>Can someone perhaps help me with a little problem I have on my database application.</p>

<p>When a user logs into my database with a User Name and Password, I want the User Name to be stored and accesible by the application as a whole (all forms etc), so that every action undertaken carries the users signature as it were.</p>

<p>I'm thinking the code is probably something like the following:</p>

<pre><code>namespace YourNamespaceName
{
    class Variables
    {
        public static string strUser = "user name";
    }
}
</code></pre>

<p>Which I can recall then with Variables.strUser</p>

<p>However I don't want to hard code the value of user name into my application.  Rather I need it to be evaluated at runtime based on the initial log in procedure, and retain the user name for reference for the duration of the application running.</p>

<p>Thanking you all in anticipation of your assistance.</p>
