Best book for learning C# when you master VB already

  • Thread starter Thread starter Klaus Jensen
  • Start date Start date
K

Klaus Jensen

Hi

I have been using VB.net for years. I have not had any practical experience
with C#, but now I want to learn, to keep growing as a programmer.

Can anybody recommend a good starter-book for me?

Thanks in advance

Klaus
 
Klaus,
As I've already mentioned, I believe the fastest way for an accomplished
VB.NET programmer to get to first base with C# is to download and use Lutz
Roeder's free Reflector utility.

You can load assemblies you've built in VB.NET, then decompile them into C#
and see what the new code looks like.

Since you are the one who wrote the original, it should be much faster than
any other method.

Regarding books, there are so many out there, I would not even hazard a
guess. You can go to Amazon.com and read the reviews from thousands of other
users and get plenty of good advice.

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
 
I would suggest that the effort is far less than you are apparently
thinking. Being that you already are familiar with the base class libraries
and have ".NET experience" in general (via VB.NET), you mostly need to learn
the syntax differences. It's really no big deal. What I would suggest is
converting a VB.NET application to C# manually. A code converter would get
the job done faster, but would possibly shortcut your learning effort. When
I made the switch a few years ago I allocated 6 weeks to do the manual
conversion of a VB.NET utility app. I was done in 3 days - no kidding. A
large portion of the "conversion to C#" was simply adding a semicolon (;) to
the end of each line.

The biggest frustration you'll have to deal with is case sensitivity. It's
totally annoying for a VB programmer at first - but soon becomes no big
deal.

You really don't need a book. Just convert some code manually.

Remember, online help (MSDN and VS.NET documentation) always has sample code
in both languages - so use that as your companion if you get stuck in your
manual conversion effort.

HTH
 
Bob Johnson said:
I would suggest that the effort is far less than you are apparently
thinking. Being that you already are familiar with the base class libraries
and have ".NET experience" in general (via VB.NET), you mostly need to
learn the syntax differences. It's really no big deal. What I would suggest
is converting a VB.NET application to C# manually. A code converter would
get the job done faster, but would possibly shortcut your learning effort.
When I made the switch a few years ago I allocated 6 weeks to do the manual
conversion of a VB.NET utility app. I was done in 3 days - no kidding. A
large portion of the "conversion to C#" was simply adding a semicolon (;)
to the end of each line.

I switched from VB.Net to C#. I spend 2 full days at the weekend to learn
the syntax and convert some existing code and on the Monday I started a C#
project.

PS
 
80% of it is easy.

switch

dim s as string = string.Empty;
with
string s = string.Empty;

or

dim i as integer = 0
i += 1

int i = 0;
i++;


20% takes about 2 - 6 weeks, depending on how much deep OO you're doing.

Example:
(how do I get a concrete class to call the contructor of its parent abstract
class?)
that's the kind stuff you'll have to google, and take longer to remember.


Its not that big of a deal. Which makes me wonder why some people fear it
so much.
 
Back
Top