Discussion:
From VB to C# - anyone know of a good book?
Ben Joyce
2007-02-02 22:15:26 UTC
Permalink
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® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Gary Harpin
2007-02-05 13:07:15 UTC
Permalink
Mark Aurit
2007-02-07 20:30:06 UTC
Permalink
Im trying to help a friend who is attempting to deploy an asp.net 2.0
app. She wants to use the membership/role system, and the necessary
database and its tables, etc, exist in the sql server 2000 instance
(which is on a seperate server). When she brings up the asp.net admin
app from within vs.net, she can do the database connection test to her
membership/role database and her application's database. However, if
she clicks on the Security tab, she gets:
"The following message may help in diagnosing the problem: An error
occurred during the execution of the SQL file 'InstallCommon.sql'. The
SQL error number is 5110 and the SqlException message is: The file
"Z:\DEVELOP\APP_DATA\ASPNETDB_TMP.MDF" is on a network path that is not
supported for database files. CREATE DATABASE failed. Some file names
listed could not be created. Check related errors. Creating the
ASPNETDB_f99997c331604d0a92dfe86aca285b0e database...".
Im at somewhat of a loss, as I role my own role systems, but a few
things jump out: the database exists, but the message says the error is
in their creation. But even if she were doing the sql server 2005 thing
where one puts the mdf file in the \App_Code, the path is not correct,
its to here development, not prod (they are on the same machine, so the
drive letter is correct).
In review:
1. asp.net 2.0
2. sql server 2000 on seperate machine
3. role/memberships database/table set up, and is recognized in the web
admin app under Providers
Any advice would be greatly appreciated.
Thanks, Mark

--
====================
Mark Aurit
***@gmail.com

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

View archives and manage your subscription(s) at http://discuss.develop.com
Efran Cobisi
2007-02-08 07:56:14 UTC
Permalink
Hi Mark,

Are you sure Z: is a label which refers to a local machine volume?
If not, and maybe it is mapping a network share, please consider that
SQLServer does not support network database files by default [1];
however, this behavior could be changed by turning on trace flag 1807.
If this is the case, I highly recommend to switch your database location
to a local machine volume, thus avoiding this issue.

[1] http://msdn2.microsoft.com/en-us/library/ms176061.aspx

HTH,

Efran Cobisi
http://www.cobisi.com

Mark Aurit wrote:
> Im trying to help a friend who is attempting to deploy an asp.net 2.0
> app. She wants to use the membership/role system, and the necessary
> database and its tables, etc, exist in the sql server 2000 instance
> (which is on a seperate server). When she brings up the asp.net admin
> app from within vs.net, she can do the database connection test to her
> membership/role database and her application's database. However, if
> she clicks on the Security tab, she gets:
> "The following message may help in diagnosing the problem: An error
> occurred during the execution of the SQL file 'InstallCommon.sql'. The
> SQL error number is 5110 and the SqlException message is: The file
> "Z:\DEVELOP\APP_DATA\ASPNETDB_TMP.MDF" is on a network path that is not
> supported for database files. CREATE DATABASE failed. Some file names
> listed could not be created. Check related errors. Creating the
> ASPNETDB_f99997c331604d0a92dfe86aca285b0e database...".
> Im at somewhat of a loss, as I role my own role systems, but a few
> things jump out: the database exists, but the message says the error is
> in their creation. But even if she were doing the sql server 2005 thing
> where one puts the mdf file in the \App_Code, the path is not correct,
> its to here development, not prod (they are on the same machine, so the
> drive letter is correct).
> In review:
> 1. asp.net 2.0
> 2. sql server 2000 on seperate machine
> 3. role/memberships database/table set up, and is recognized in the web
> admin app under Providers
> Any advice would be greatly appreciated.
> Thanks, Mark
>
> --
> ====================
> Mark Aurit
> ***@gmail.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
Mark Aurit
2007-02-08 21:01:04 UTC
Permalink
Thanks.
The solution was to place the providers in her app's web.config.

Efran Cobisi wrote:
> Hi Mark,
>
> Are you sure Z: is a label which refers to a local machine volume?
> If not, and maybe it is mapping a network share, please consider that
> SQLServer does not support network database files by default [1];
> however, this behavior could be changed by turning on trace flag 1807.
> If this is the case, I highly recommend to switch your database location
> to a local machine volume, thus avoiding this issue.
>
> [1] http://msdn2.microsoft.com/en-us/library/ms176061.aspx
>
> HTH,
>
> Efran Cobisi
> http://www.cobisi.com
>
> Mark Aurit wrote:
>> Im trying to help a friend who is attempting to deploy an asp.net 2.0
>> app. She wants to use the membership/role system, and the necessary
>> database and its tables, etc, exist in the sql server 2000 instance
>> (which is on a seperate server). When she brings up the asp.net admin
>> app from within vs.net, she can do the database connection test to her
>> membership/role database and her application's database. However, if
>> she clicks on the Security tab, she gets:
>> "The following message may help in diagnosing the problem: An error
>> occurred during the execution of the SQL file 'InstallCommon.sql'. The
>> SQL error number is 5110 and the SqlException message is: The file
>> "Z:\DEVELOP\APP_DATA\ASPNETDB_TMP.MDF" is on a network path that is not
>> supported for database files. CREATE DATABASE failed. Some file names
>> listed could not be created. Check related errors. Creating the
>> ASPNETDB_f99997c331604d0a92dfe86aca285b0e database...".
>> Im at somewhat of a loss, as I role my own role systems, but a few
>> things jump out: the database exists, but the message says the error is
>> in their creation. But even if she were doing the sql server 2005 thing
>> where one puts the mdf file in the \App_Code, the path is not correct,
>> its to here development, not prod (they are on the same machine, so the
>> drive letter is correct).
>> In review:
>> 1. asp.net 2.0
>> 2. sql server 2000 on seperate machine
>> 3. role/memberships database/table set up, and is recognized in the web
>> admin app under Providers
>> Any advice would be greatly appreciated.
>> Thanks, Mark
>>
>> --
>> ====================
>> Mark Aurit
>> ***@gmail.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
>

--
====================
Mark Aurit
***@gmail.com

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

View archives and manage your subscription(s) at http://discuss.develop.com
Mike Andrews
2007-02-08 21:29:54 UTC
Permalink
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 <***@gmail.com> 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® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Peter Vertes
2007-02-08 22:05:17 UTC
Permalink
On 2/8/07, Mike Andrews <***@gmail.com> wrote:


> Pro ASP.NET 2.0 in C# 2005
> Matthew MacDonald and Mario Szpuszta
>
> C# 2005 and the .NET 2.0 Platform
> Andrew Troelsen



I have these two books and both of them are required reading/reference for
all of my team members. Andrew's book, while it doesn't cover everything,
is still exceptional in the clear way he writes and explains things. The
first couple of chapters are devoted to language constructs and other C#
specific items and the rest of the book you will use as a reference, since
you are a seasoned developer already. Plus the the book enables you to
download a PDF version of it that you can use when you don't have the book
handy (actually you can do this with Matthew's and Mario's book as well).
While I haven't read Matthew and Mario's book cover to cover I did find
their writing style clear and engaging with detailed explanations about
certain topics in the book that I had questions about.

-Pete

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

View archives and manage your subscription(s) at http://discuss.develop.com
Ben Joyce
2007-02-09 13:46:41 UTC
Permalink
Hi Mike.

On 2/8/07, Mike Andrews <***@gmail.com> wrote:
> Is there a particular reason why?

Mainly to broaden my skillset; I'm comfortable with VB but I'd like to
see if C# offers some better/different ways of doing things. Also it
would widen the choice of roles when looking for work and increase my
earning potential.

<snip>

> 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#.

Yes, this is a widespread myth and it's good to see VB being taken
more seriously in it's .NET guise.

> 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)

Cheers Mike, and thanks to Peter for his reply too.

> On 2/2/07, Ben Joyce <***@gmail.com> 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
Mike Andrews
2007-02-09 14:28:09 UTC
Permalink
There are some slight but significant language differences and ways of
handling things in C# vs. VB.
But overall, if you know how to program, it's really a matter of learning
the Framework methods that make the difference.


On 2/9/07, Ben Joyce <***@gmail.com> wrote:
>
> Hi Mike.
>
> On 2/8/07, Mike Andrews <***@gmail.com> wrote:
> > Is there a particular reason why?
>
> Mainly to broaden my skillset; I'm comfortable with VB but I'd like to
> see if C# offers some better/different ways of doing things. Also it
> would widen the choice of roles when looking for work and increase my
> earning potential.
>
> <snip>
>
> > 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#.
>
> Yes, this is a widespread myth and it's good to see VB being taken
> more seriously in it's .NET guise.
>
> > 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)
>
> Cheers Mike, and thanks to Peter for his reply too.
>
> > On 2/2/07, Ben Joyce <***@gmail.com> 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(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
Matthew McDonald
2007-02-09 19:17:22 UTC
Permalink
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 <***@gmail.com> 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 <***@gmail.com> 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
David Cameron
2007-02-11 12:08:14 UTC
Permalink
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 <***@gmail.com> 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 <***@gmail.com> 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
Peter Suter
2007-02-11 21:22:28 UTC
Permalink
subjective and emotional
nice


----- Original Message -----
From: "David Cameron" <***@UBERCONCEPT.COM>
To: <DOTNET-***@DISCUSS.DEVELOP.COM>
Sent: Sunday, February 11, 2007 11:08 PM
Subject: Re: [DOTNET-WEB] From VB to C# - anyone know of a good book?


> 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 <***@gmail.com> 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 <***@gmail.com> 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
>

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

View archives and manage your subscription(s) at http://discuss.develop.com
Shawn Wildermuth (MVP)
2007-02-11 21:43:06 UTC
Permalink
David Cameron
2007-02-12 11:21:17 UTC
Permalink
Emotional, no.

Subjective, yes to *some* extent. Have you read .Net Gotchas?

regards
David

Peter Suter wrote:
> subjective and emotional
> nice
>
>
> ----- Original Message -----
> From: "David Cameron" <***@UBERCONCEPT.COM>
> To: <DOTNET-***@DISCUSS.DEVELOP.COM>
> Sent: Sunday, February 11, 2007 11:08 PM
> Subject: Re: [DOTNET-WEB] From VB to C# - anyone know of a good book?
>
>
>> 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 <***@gmail.com> 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 <***@gmail.com> 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
>>
>
> ===================================
> 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
Hodgin, Scott
2007-02-12 14:17:37 UTC
Permalink
We started one of our big projects writing in VB.net and quickly realized,
as the number of classes increased in the project (100's), that the VB
background compiler (while very nice in dynamically telling you what is
wrong syntax wise and misspelled variables and the like) wound up slowing
the IDE way too much. We rewrote everything in C#.

Scott Hodgin
Database Administrator
South Carolina Farm Bureau Insurance Company
***@scfbins.com


-----Original Message-----
From: Mike Andrews [mailto:***@GMAIL.COM]
Sent: Thursday, February 08, 2007 4:30 PM
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] From VB to C# - anyone know of a good book?

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 <***@gmail.com> 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
Shawn Wildermuth (MVP)
2007-02-12 14:53:57 UTC
Permalink
Hodgin, Scott
2007-02-12 21:44:20 UTC
Permalink
It's my understanding that the VB.net background compiler cannot be turned
off.

Scott Hodgin
Database Administrator, (MCITP-SQL Server 2005)
South Carolina Farm Bureau Insurance Company
***@scfbins.com


-----Original Message-----
From: Shawn Wildermuth (MVP) [mailto:***@ADOGUY.COM]
Sent: Monday, February 12, 2007 9:54 AM
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] From VB to C# - anyone know of a good book?

Couldn't you have turned off the background compiler? That's a VS issue,
not a VB issue.

Thanks,

Shawn Wildermuth
Wildermuth Consulting Services, LLC
http://adoguy.com
http://wildermuthconsulting.com
Microsoft MVP (C#), MCSD.NET, Author and Speaker

-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Hodgin, Scott
Sent: Monday, February 12, 2007 9:18 AM
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] From VB to C# - anyone know of a good book?

We started one of our big projects writing in VB.net and quickly realized,
as the number of classes increased in the project (100's), that the VB
background compiler (while very nice in dynamically telling you what is
wrong syntax wise and misspelled variables and the like) wound up slowing
the IDE way too much. We rewrote everything in C#.

Scott Hodgin
Database Administrator
South Carolina Farm Bureau Insurance Company
***@scfbins.com


-----Original Message-----
From: Mike Andrews [mailto:***@GMAIL.COM]
Sent: Thursday, February 08, 2007 4:30 PM
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] From VB to C# - anyone know of a good book?

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 <***@gmail.com> 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 DevelopMentorR 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
Continue reading on narkive:
Loading...