By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,462 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

.Net languages

P: n/a
What is a good source of unbiased info about the relative value of
programming in C#.Net vs VB.Net for a web-based application? Everyone seems
to like what is most familiar to them, and I am looking for objective
differences.
Thanks for the input.
--
sam
Jul 21 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a

I think that as of the .Net 2005 version the only differences will be

C# - Full pointers, bit shift operators, unsafe keyword, string literal
escapes ("\t" etc)
VB - Restircted pointers, On Error handling, ReDim Preserve

I dont think C# will ever be given On Error handling as most VB programmers
are moving to the Try ... Catch ... End Try exception handeling. Also, I
think ReDim Preserve will most like stay VB. On the other hand it is
resonable to expect that maybe after .Net 2005 VB will be given bit shift
operatiors. However, I don't think VB will be given string literal escapes.
Finally, I don't think VB will get full pointers or an unsafe keyword
equivalent because it can use the .Net Marshal object to get access to
memory locations.

So at .Net 2005 I think the main difference between the two will be purely
syntax cosmetics. I feel that VB has a friendlier syntax then C#. C# has a
more technical feel with all the curly braces and semicolons.

Who knows, .Net 2007 may only have one language VCB# (Visual C Basic Sharp).
:)

Robby

"smk23" <sm***@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
What is a good source of unbiased info about the relative value of
programming in C#.Net vs VB.Net for a web-based application? Everyone
seems
to like what is most familiar to them, and I am looking for objective
differences.
Thanks for the input.
--
sam

Jul 21 '05 #2

P: n/a
Hey Sam,

I'm a bit surprised that you have gotten very strong feelings from people.
As Robby pointed out, the languages are virtually identical as to
functionality (he seems to have hit on most differences). One source you
might check is a bookstore. There are a number of books that are written in
C# and VB versions by the same author. Find book XYZ for C# and XYZ for VB,
pop 'em open to the same topic and compare. In most cases you're likely to
find that the text is the same except that they cut-and-pasted the pertinent
version of the code. You'll also find that the programs follow the same
steps, using the same code except for what are really style differences (do
you prefer "Dim MyVar As SomeType" or "sometype MyVar;").

One specific book would be MS Press' books for MCSD prep. They tend to
cover both languages and (at least in the one I've read) will have the two
flavors of snippets with only sporadic mentionings to the effect of, "In VB
you would have to do this because it does not support this feature."

- John
"smk23" <sm***@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
What is a good source of unbiased info about the relative value of
programming in C#.Net vs VB.Net for a web-based application? Everyone seems to like what is most familiar to them, and I am looking for objective
differences.
Thanks for the input.
--
sam

Jul 21 '05 #3

P: n/a
Thanks so much for the input. I guess my other question is whether there is
any difference in portability outside MS platforms.

"Robby" wrote:

I think that as of the .Net 2005 version the only differences will be

C# - Full pointers, bit shift operators, unsafe keyword, string literal
escapes ("\t" etc)
VB - Restircted pointers, On Error handling, ReDim Preserve

I dont think C# will ever be given On Error handling as most VB programmers
are moving to the Try ... Catch ... End Try exception handeling. Also, I
think ReDim Preserve will most like stay VB. On the other hand it is
resonable to expect that maybe after .Net 2005 VB will be given bit shift
operatiors. However, I don't think VB will be given string literal escapes.
Finally, I don't think VB will get full pointers or an unsafe keyword
equivalent because it can use the .Net Marshal object to get access to
memory locations.

So at .Net 2005 I think the main difference between the two will be purely
syntax cosmetics. I feel that VB has a friendlier syntax then C#. C# has a
more technical feel with all the curly braces and semicolons.

Who knows, .Net 2007 may only have one language VCB# (Visual C Basic Sharp).
:)

Robby

"smk23" <sm***@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
What is a good source of unbiased info about the relative value of
programming in C#.Net vs VB.Net for a web-based application? Everyone
seems
to like what is most familiar to them, and I am looking for objective
differences.
Thanks for the input.
--
sam


Jul 21 '05 #4

P: n/a

"smk23" <sm***@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
Thanks so much for the input. I guess my other question is whether there is any difference in portability outside MS platforms.

At the risk of oversimplifying, both VB (.NET) and C# are inextricably tied
to the .NET Framework not necessarily to Microsoft, so as the .NET Framework
goes, so go VB and C#. Currently, TTBOMK, we have Microsoft and the Mono
project.

http://www.mono-project.com/about/index.html

which has both VB and C# compilers.

If there are others, I'm sure more posts will appear here.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Jul 21 '05 #5

P: n/a

VB.Net and C# have equal portability. Remember, these are based on the .Net
Framework so any system that has the .Net Framework installed can use your
assemblies.

However, for maximum cross-platform compatabilty do not use any platform
specific namespaces, objects or features that are not fully Common
Language Specification (CLS) compliant. I think only the Microsoft.Win32
namespace is platform specific so avoid using any objects in that namespace.
An example of an non-compliant CLS feature are type parameters in generic
classes in VB defined with the Of keyword. I think this may change as I
could find nothing stating that type parameters where not CLS compliant for
C#, .Net 2005 is still in beta. All features that are not compliant will
state so in the documentation. Sticking to .Net Framework objects and CLS
compliant features in both VB, C# and any future .Net language is the best
way to ensure crossplatform compatibilty.

Robby
"smk23" <sm***@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
Thanks so much for the input. I guess my other question is whether there
is
any difference in portability outside MS platforms.

"Robby" wrote:

I think that as of the .Net 2005 version the only differences will be

C# - Full pointers, bit shift operators, unsafe keyword, string literal
escapes ("\t" etc)
VB - Restircted pointers, On Error handling, ReDim Preserve

I dont think C# will ever be given On Error handling as most VB
programmers
are moving to the Try ... Catch ... End Try exception handeling. Also, I
think ReDim Preserve will most like stay VB. On the other hand it is
resonable to expect that maybe after .Net 2005 VB will be given bit shift
operatiors. However, I don't think VB will be given string literal
escapes.
Finally, I don't think VB will get full pointers or an unsafe keyword
equivalent because it can use the .Net Marshal object to get access to
memory locations.

So at .Net 2005 I think the main difference between the two will be
purely
syntax cosmetics. I feel that VB has a friendlier syntax then C#. C#
has a
more technical feel with all the curly braces and semicolons.

Who knows, .Net 2007 may only have one language VCB# (Visual C Basic
Sharp).
:)

Robby

"smk23" <sm***@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
> What is a good source of unbiased info about the relative value of
> programming in C#.Net vs VB.Net for a web-based application? Everyone
> seems
> to like what is most familiar to them, and I am looking for objective
> differences.
> Thanks for the input.
> --
> sam


Jul 21 '05 #6

P: n/a
Robby <ed****@not.my.email.com> wrote:

VB.Net and C# have equal portability. Remember, these are based on the .Net
Framework so any system that has the .Net Framework installed can use your
assemblies.

However, for maximum cross-platform compatabilty do not use any platform
specific namespaces, objects or features that are not fully Common
Language Specification (CLS) compliant. I think only the Microsoft.Win32
namespace is platform specific so avoid using any objects in that namespace.


No - there's also the Microsoft.VisualBasic namespace, which many
VB.NET programs will use without the developer really knowing. While
Mono has ported many of the classes within this namespace, I suspect
there are still a few gaps.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #7

P: n/a

"Robby" <ed****@not.my.email.com> wrote in message
news:O5**************@TK2MSFTNGP12.phx.gbl...

I think that as of the .Net 2005 version the only differences will be

C# - Full pointers, bit shift operators, unsafe keyword, string literal
escapes ("\t" etc)
VB - Restircted pointers, On Error handling, ReDim Preserve


Actually, the differences are more compliated than that. VB adds the My
namespace and C# adds two rather significant features: anonymous methods and
iterators.(Unless things have changed significantly and escaped me)

Anyway, for web applications, there is virtually no difference, but as far
as code structure goes, I think C# and VB will likely begin to influence
designs differently.

Jul 21 '05 #8

P: n/a
You might consider reading my reply to "ASP to .Net migration project"
posted 12/16.
--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/

"smk23" <sm***@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
What is a good source of unbiased info about the relative value of
programming in C#.Net vs VB.Net for a web-based application? Everyone seems to like what is most familiar to them, and I am looking for objective
differences.
Thanks for the input.
--
sam

Jul 21 '05 #9

P: n/a
Some people consider C# a "cleaner" and more "oop-like" language than VB.
Both languages have features with the other is missing. If you turn Option
Strict=On VB is as much typesafe as C#.

But at the end, behind all .NET languages in the same runtime library and
the same functionality.

So if you or your team feels more confortable with VB, then use it, and if
your team feels more comfortable with C-style syntax use C#.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"smk23" <sm***@discussions.microsoft.com> schrieb im Newsbeitrag
news:00**********************************@microsof t.com...
What is a good source of unbiased info about the relative value of
programming in C#.Net vs VB.Net for a web-based application? Everyone seems to like what is most familiar to them, and I am looking for objective
differences.
Thanks for the input.
--
sam

Jul 21 '05 #10

P: n/a
Daniel,

You make me curious, why you write C# and not C, while you are not writing
VB.Net but VB?

Cor
Jul 21 '05 #11

P: n/a

"Cor Ligthert" <no************@planet.nl> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl...
Daniel,

You make me curious, why you write C# and not C, while you are not
writing VB.Net but VB?


I'm not writing VB.NET or VB, I just simply didn't bother to prefix .NET to
the name VB.

Also, AFAIK, in whidbey VB is no longer VB.NET, it is just VB8\VB 2005. Even
C# isn't labeld C#.NET any longer, whereas it was in 2k3.
Jul 21 '05 #12

P: n/a
I don't think there are project breaking differences between C# and
VB.NET.
The power language remains managed C++ which in Visual Studio 2005
generates more optimized IL than C# or VB.NET.

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #13

P: n/a
Daniel,

I can of course post a message to the OP wherein I write something about C
languages in the same way as you and others did about VB. I don't do that,
there is enough written in this newsgroups about this.

However when people show as you do that they apparently have few knowledge
about the differences between the VB.Net version and classic VB than in my
opinion would they not give a reaction.

You are not the only one by the way, while there are others who did it very
correct.

Just my opinion.

Cor

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net>

"Cor Ligthert" <no************@planet.nl> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl...
Daniel,

You make me curious, why you write C# and not C, while you are not
writing VB.Net but VB?


I'm not writing VB.NET or VB, I just simply didn't bother to prefix .NET
to the name VB.

Also, AFAIK, in whidbey VB is no longer VB.NET, it is just VB8\VB 2005.
Even C# isn't labeld C#.NET any longer, whereas it was in 2k3.

Jul 21 '05 #14

P: n/a
However when people show as you do that they apparently have few knowledge
about the differences between the VB.Net version and classic VB than in my
opinion would they not give a reaction.


I am well aware of the differences. However, classic VB is well on its way
down . The .NET name is being dropped from almost all products(including C#)
and VB.NET will no longer *be* VB.NET. Beyond that, VB == Visual Basic, C# =
C-SHarp, C would be pretty close to Managed C++. There would be very little
sense in droping the # I would think.

Anyway, this discussion was within the context of .NET, asking about VB.NET,
thus it isn't to much of a stretch to figure out that VB==VB.NET.

And my message was to correct a fallacy. He said that the languages would be
pretty equal except for a set of differences that were already there. I
pointed out that each language is diverging and there are a number of
differences beyond the very minimal list he posted.
Jul 21 '05 #15

P: n/a
Daniel,

That the Net name *will be* dropped does not mean that it *is*.

The IDE of VB.Net is very forgiving full (and so am I, not that there is
something to forgive here), however you as C# man, should know that direct
correct syntax gives better results, especially in C#.

:-)

Cor
Jul 21 '05 #16

P: n/a
VB.Net is a RAD language and VS.Net supports many RAD features like
providing automatic indentation, automatic casing and an
easy-to-understand English-based syntax.

C# does not provide any of the above and has a technical syntax. For
Windows apps., VB.Net provides the same interface as VS6.0 in that any
form can be made the startup form unlike in VC#.Net.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.