Re: From VB to C# - anyone know of a good book?

David Cameron <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <[email protected]>
I'll second that: C# is better than VB for .Net

In addition to the other features, IMO VB.Net is a retrofit of features
to bring it up to the level of C#. It uses the clunky syntax of VB and
it isn't always a good fit.

C# is a more concise and expressive language. In addition if you read
books like .NET Gotchas (http://www.oreilly.com/catalog/netgotchas/) you
will see a stack of issues that relate directly to VB.net that don't
apply to C# (this is a comment more for 1.1 not 2.0).

My personal belief (and someone from Microsoft may be able to correct me
on this) is that .net and C# were the original pair and VB was added
later. I also believe that Microsoft is more likely to drop support for
VB.Net than C#.

David

Matthew McDonald wrote:
> If you're familiar with VB.NET and OOP you should pick up C# pretty
> quickly.
>
> A few advantages of C# over VB:
> -VB doesn't actualy compile to IL very well, (ask the mono guys). A lot of
> VB.NET functionality relies on a binary assembly.
> -C# has anonymous methods
> -C# was designed with .NET specifically in mind
> -While performance is rarely an issue in .NET, C# typically runs a little
> better since its syntax is easier to compile to IL
> -VB is capable of allowing some really bad techniques (for example you
> don't
> have make explicit casts which undermines the advantages of having a
> strongly typed assembly)
>
> I do agree that VB is a perfectly viable language. However, you really need
> to have a lot of discipline when you code in it and you also need to
> spend a
> little more time versing yourself in best practices otherwise you're likely
> to hose anyone who ever has to deal with your code later.
>
> -Matt McDonald
>
> On 2/8/07, Mike Andrews <[email protected]> wrote:
>>
>> Is there a particular reason why?
>>
>> I'm fluent in both and can easily switch between them.  C# is the
>> language
>> for my work and I write all my other code in VB.
>> My favorite is VB.
>>
>> I think the IDE has been improved over the C# IDE for VB programmers.
>> C# IDE is more combersome when dealing with objects and events.
>> VB has the My namespace (although I wish it was named something
>> different)
>> which contains many very useful shortcuts; it should be a part of both
>> "languages".
>> The VB intellisense is slightly better.
>> VB gives you the ability to have parameterized properties.
>> (I realize I'll get hammered on this one)...
>> I love the fact that VB makes some implict conversions for you and you
>> don't
>> have to explicitly cast everything.
>>
>> But in raw power, and usage of the Framework, neither one surpasses the
>> other.  It's really a matter of preference regardless of what one
>> proponent
>> says over the other.  It all boils down to IDE.  They both compile into
>> the
>> same IL.
>>
>> That said, what does make a difference is holding on to the vestigages of
>> VB
>> such as using ON ERROR RESUME NEXT and other such VB specific constructs
>> about which the compiler has to make assumptions.
>>
>> I believe the reason that the perception is that C# is "better" is
>> that VB
>> is still viewed as a substandard way of accomplishing programming tasks
>> and
>> that could not be further from the truth.  VB is just as viable a
>> programming solution for development as C#.
>>
>> As far as a book for C#, these I would highly recommend; I own these and
>> they have been a tremendous help.  You must remember, however, that they
>> may
>> be called "C#", but they're Framework books and the examples (for the
>> most
>> part) will apply regardless of language.  These books do have a
>> counterpart
>> for VB as well.
>>
>>
>> Pro ASP.NET 2.0 in C# 2005
>>   Matthew MacDonald and Mario Szpuszta
>>
>> C# 2005 and the .NET 2.0 Platform
>>   Andrew Troelsen
>>
>> Pro .NET 20.0 Windows Froms and Custom Controls in C#
>>   Matthew MacDonald
>>
>> Windows Form 2.0 Programming
>>   chris Sells and Michael Weinhardt
>>
>> Professional C# 2005
>>   (too many authors to name)
>>
>>
>>
>>
>>
>> On 2/2/07, Ben Joyce <[email protected]> wrote:
>> >
>> > Hi all.
>> >
>> > I've decided to start learning C# and also practice more OO
>> > programming.  Does anyone have any book recommendations?  I'm an
>> > experienced VB developer so I'm guessing beginner-level might be a
>> > waste, but perhaps I need to unlearn my VB ways to learn C# the
>> > correct way?
>> >
>> > I hope that makes sense!
>> >
>> > Any help appreciated.
>> >
>> > Ben
>> >
>> > ===================================
>> > This list is hosted by DevelopMentor(r)  http://www.develop.com
>> >
>> > View archives and manage your subscription(s) at
>> > http://discuss.develop.com
>> >
>>
>> ===================================
>> This list is hosted by DevelopMentor(r)  http://www.develop.com
>>
>> View archives and manage your subscription(s) at
>> http://discuss.develop.com
>>
>
> ===================================
> This list is hosted by DevelopMentor®  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.