Though most programmers use two or more languages, they usually have a mastery of one. Although Microsoft has advertised that the .NET runtime is language agnostic and that C# and Visual Basic .NET are so close that switching between the two is really quite easy, that?s only true up to a point. Some of the differences are obvious, but others are very subtle. C# & VB.NET Conversion Pocket Reference helps you easily make the switch from one language to another. The differences occur in three main areas: syntax, object-oriented principles, and the Visual Studio .NET IDE. Syntax concerns the statements and language elements. Object oriented differences are less obvious, and concern differences in implementation and feature sets between the two languages. IDE differences include things like compiler settings or attributes. There is also a fourth area of difference: language features that are present in one language but have no equivalent in the other. These unique language features are also covered in this book. C# & VB.NET Conversion Pocket Reference is a perfect companion for documents and books that don?t have examples using your mastered language.Author Jose Mojica expects that you know one of the two languages, but does not make an assumption about which one. He presents the information in a language-neutral point of view so that programmers from either background can read a section and feel that it is targeted to them.
Introduction Conventions Used in This Book Syntax Differences Case Sensitivity Line Termination Comments Namespace Declaration and Usage Variable Declaration Variable Initialization Declaring Function Parameters Passing Function Parameters Optional Parameters Parameter Lists Method Declaration Returning Output Parameters Program Startup Exiting Programs/Methods/Loops Member Scope Static and Shared Methods Classes Versus Modules If Statements Short-Circuiting Conditional Statement Properties and Indexers Arrays for Loops For/Each Loops Try/Catch Blocks Attribute Usage Control Characters Type Comparison and Conversion Object-Oriented Features Inheritance Syntax Method Overloading Constructors and Field Initializers Invoking Other Constructors Invoking Base Constructors Initializers Hiding Base Class Members Overriding Methods Requiring/Preventing Inheritance Declaring and Implementing Interfaces Delegates and Events Comparing Classes String Comparisons IDE Differences AssemblyInfo.x Default/Root Namespace Startup Object App.ico Imports / using COM References Compiler Constants Option Explicit, Option Strict, Option Compare Errors and Warnings Unique Language Features Unsafe Blocks (C SHARP) using (C SHARP) Documentation Comments (C SHARP) Operator Overloading (C SHARP) Late Binding (VB)