Chapter 9: The Quick C Translation Guide


Overview

C# IS THE NEW all- singing , all- dancing .NET language. It s fresh, it s the result of mixing C and the .NET Framework, it s the one language every self-respecting author is writing books about these days ( ahem ). It comes with the biggest stamp of Microsoft approval and, rumor has it, is in fact Bill Gates love child.

But the truth is, C# ”pronounced C sharp ”is practically identical to VB .NET.

After all, it s based on the .NET Framework, just like VB .NET. It uses all the same base classes and compiles down to the same intermediate language. It accesses databases, writes to the registry, and displays forms in exactly the same way.

There are a couple of little-used, hoity-toity differences, but nothing the experienced Visual Basic programmer would want to switch languages for. Indeed, there are quite a number of reasons why one wouldn t want to move to C#. However, realistically , both of the .NET languages are virtually identical when it comes to capability.

Capability, yes , but not syntax. C# will almost certainly look alien to you, especially if you ve never dabbled in the likes of C or Java. Still, who cares? You program in Visual Basic .NET and shouldn t need to worry about C#. True however, with the plethora of new C#-based content hitting the market ”from books to Web sites to videos ”who s betting you ll soon find a chunk of code you need to translate across to VB .NET. That is, of course, if you haven t already.

Or maybe one of your in-house programmers is writing C# code as part of your project. The two languages will easily work together ”but, when debugging, will you be able to glance through that code and understand what s going on?

That s when you need a quick translation guide ”to be specific, this quick translation guide. In this final chapter, I ll be showing you common statements in C#, explain what s happening, and provide the VB .NET equivalent. You ll also learn how to cheat at the translation process, plus find out where you can learn more about the language.

It s like one of those Berlitz Spanish guides. It won t teach you to speak the language. But, with a bit of flicking through the pages, you ll soon be able to figure out just what s being said.

Anyway, watch out C#. The VB guys are coming.




The Ultimate VB .NET and ASP.NET Code Book
The Ultimate VB .NET and ASP.NET Code Book
ISBN: 1590591062
EAN: 2147483647
Year: 2003
Pages: 76
Authors: Karl Moore

Similar book on Amazon

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