Fun with Visual Studio 2010 compiler

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

I have following line of code, which obviously cannot be compiled, because the variable x has already been declared.

image

This is what I thought too. So, I was looking for declaration and didn’t find it. Hmmm?!?
So, the only reasonable explanation of this could be, that I just declare it but cannot find it. Hmmm, not very possible, but let’s assume it.
Ok, if the variable has been declared it must be possible to declare the other one and assign existing ‘x’ to it:

image

Uupps. Smile


Posted Jan 04 2012, 11:38 AM by Damir Dobric
Filed under:
developers.de is a .Net Community Blog powered by daenet GmbH.