local variable performance in Javascript vs C#
<p>My Javascript code here. Instead of everytime trying to access document which is global context we made it to activation object. So that we can improve our read/write performance.</p>

<pre><code>function initUI(){
        var doc = document,
            bd = doc.body,
            links = doc.getElementsByTagName("a"),
            i= 0,
            len = links.length;
        while(i &lt; len){
            update(links[i++]);
        }
        doc.getElementById("go-btn").onclick = function(){
            start();
        };
        bd.className = "active";
    }
</code></pre>

<p>Whether is it applicable to C# as well?
Lets say,</p>

<p>defining <code>var customObject = new CustomClass();</code> as a member variable and accessing like below,</p>

<pre><code>void MyMethod()
{
var obj = customObject;
var name = obj.name;
//some code here
..
..
}
</code></pre>

<p>will increase the performance?</p>
