Chapter 2. Visual Studio and Compiler Gotchas


.NET provides a very productive development environment, thanks to two main factors. One is the .NET Framework with its rich class library. The other is Visual Studio .NET, with its many wizards.

The code you write in C# or VB.NET is translated into MSIL by the C# compiler (csc.exe) or the VB.NET compiler (vbc.exe). A few idiosyncrasies of the compilers, and how Visual Studio presents them, can cause frustration in some cases and outright trouble in others. And several things get lost in the translation to MSIL. Not all source-code statements are translated quite as you might expect. This will come to light, for instance, when I discuss the odd behavior related to re-throwing an exception.

In this chapter I will focus on Visual Studio- and compiler-related gotchas.



    .NET Gotachas
    .NET Gotachas
    ISBN: N/A
    EAN: N/A
    Year: 2005
    Pages: 126

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net