Join Declaration and Assignment or not to join...That is the question
<p>There are 2 school of thoughts on debugging.  One says declare your variable first, then assign...for easier debugging.</p>

<pre><code>int myInt;
myInt = GetSomething();
</code></pre>

<p>or there is a school of thought that says that's just not clean, just do this:</p>

<pre><code>int myInt = GetSomething();
</code></pre>

<p>I don't understand how the first helps.  Because if I put a debug point over myInt in either case, it's going to give me a value that I can check anyway.  </p>

<p>So can someone tell me in detail when debugging, how the first approach is worth putting 2 lines in?  I know some people swear by it.</p>

<p>Obviously there are times you must do the first, because you may need to do more than just a one-time set such as set an object's properties.  But outside that, a one-time call to set a variable is what I'm specifically talking about here.</p>
