c# Inheritance, static to store globally
<p>any idea to simplify the code? Sorry, added, is web application,
example, I had an userID value that store when login, and I session the value, but the point is, I had so many class that will use the same variable for further checking, how can I reduce the code?</p>

<pre><code>string xxx= session("UserID");

Logon.checkUser(xxx);
Attempt.Check(xxx);
NNN.Check(xxx);
yyy.dosomething(xxx);
</code></pre>

<p>I try inherit the class, but the value gone after go through the next class, unless need to pass in the value again.</p>

<p>I try static and inherit it, the value are remain at the base class and it work great which reduce the repeatative work , but it is ok to use static to store all the value? or there any better idea?</p>
