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

Any difference between VB.net and C#.net

P: n/a
Is there any difference between these "languages" any more or are they just
syntactically different but represent the same thing? A long time ago VB was
more for "noobs" while something like C++ was for experts. While you could
also do one thing in the other it wasn't always easy. Seems now that .Net
has made these languages fundamentally the same but only syntactically
different?

Jon
Sep 28 '06 #1
Share this Question
Share on Google+
13 Replies


P: n/a
All programming languages are fundamentally the same but only syntactically
different.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
Is there any difference between these "languages" any more or are they
just syntactically different but represent the same thing? A long time ago
VB was more for "noobs" while something like C++ was for experts. While
you could also do one thing in the other it wasn't always easy. Seems now
that .Net has made these languages fundamentally the same but only
syntactically different?

Jon

Sep 28 '06 #2

P: n/a
Hello Jon,

I'd add to Kevin that behaviour of some things are different in VB.NET and C#
I recomend to read O'Reilly ".NET Gotchas" book about these differences

JSIs there any difference between these "languages" any more or are
JSthey just syntactically different but represent the same thing? A
JSlong time ago VB was more for "noobs" while something like C++ was
JSfor experts. While you could also do one thing in the other it
JSwasn't always easy. Seems now that .Net has made these languages
JSfundamentally the same but only syntactically different?
JS>
JSJon
JS>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 28 '06 #3

P: n/a
Both compile down to CLR so in concept there is no difference in the
resulting code. There might be a couple small things that might be easier
to accomplish in one or the other but I would suggest just using whichever
you are more comfortable in.

Regards,
John

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
Is there any difference between these "languages" any more or are they
just syntactically different but represent the same thing? A long time ago
VB was more for "noobs" while something like C++ was for experts. While
you could also do one thing in the other it wasn't always easy. Seems now
that .Net has made these languages fundamentally the same but only
syntactically different?

Jon

Sep 28 '06 #4

P: n/a
"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
Is there any difference between these "languages" any more or are they
just syntactically different but represent the same thing? A long time ago
VB was more for "noobs" while something like C++ was for experts. While
you could also do one thing in the other it wasn't always easy. Seems now
that .Net has made these languages fundamentally the same but only
syntactically different?
There is one fundamental difference - C# supports pointers / unmanaged code
and VB.NET doesn't. However, for the vast majority of programmers, that is a
non-issue...
Sep 28 '06 #5

P: n/a
Hi,

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
Is there any difference between these "languages" any more or are they
just syntactically different but represent the same thing? A long time ago
VB was more for "noobs" while something like C++ was for experts.
Not true. VB was good at a lot of things. I know lot of smart people (me
included) who were using VB back in the day. Developing ASP sites was a
charm with COM dll written in VB and VBScript for ASP.

A similar thing with win apps VB provided a fast, easy environment to
program.
Right now there is barely any difference between C# and Vb.net that you find
on a daily basis. Just the sintaxis , that IMO is much better in C# than in
VB
Sep 28 '06 #6

P: n/a

Here is my list. My company was solely a VB.Net shop, and this is the list
used to show some differences.
Here is as concrete as I could get, with no commentary.
This way my best attempt. If there are workarounds, please politely list
them.
I'm not trying to start an old and dead horse war, just listing what
concrete items I have found.

This is a 1.1 list. Some may or may not apply in 2.0.
VB.NET has no "using" directive.
VB.NET does not do automatic namespacing. Whenever you put in a new folder
and/or class, C# puts in "namespace MyCompany.Technology.Args" for you.
In VB.NET you have to ~remember to put in "namespace
MyCompany.Technology.SomethingElse". Or everything defaults to the default
namespace.
VB.NET does not provide pre-build or post-build steps.
(there is a work around available for this , one is build rules ex
http://www.gotdotnet.com/Community/U...8-f84469fc49e2
)
VB.NET has no built-in comment->documentation generator
(see previous forum post about GhostDoc)
(there is a work around available for the default c# functionality, but
there is no equivalent GhostDoc feature)
See demo at
http://channel9.msdn.com/Showpost.aspx?postid=121822
VB.NET regions are not as flexible as c# regions.
The key here is that you can place a region ~~inside a function (in C#),
thus breaking up the implementation into logical pieces.

VB.NET does not allow the application the <NonSerializedattribute to
events (you can in C# by using the Field: modifier).
As a result, there is no simple way of telling the runtime not to serialize
the event fields.
This results in serializing objects that you didn't expect, resulting in a
larger stream.
If the object handling the events is not Serializable, then the
serialization process will throw an exception.
( See http://www.codeproject.com/vb/net/se...evbclasses.asp for more info
and workaround )

VB.NET has less features with its static code analysis (as in, when you go
to Build / Build Solution).
Issues like : functions that don't return values, uninitialized variables,
unused variable declarations, etc...
Development time (in c#) is slightly decreased by finding these issues at
compile time.
VB.NET does not have ... Increments/Decrements. a++;a--;
VB.NET does not have operator overloading. C# has Operator Overloading.
(see http://www.csharphelp.com/archives/archive135.html)

VB.NET has no multiline comment syntax

VB.NET has no within-the-line comment syntax

VB.NET has no multiline string syntax

VB.NET has a limit on line continuations (I think the limit is 10?)


Sep 28 '06 #7

P: n/a

PS

When asking the question, you may want to include.

Have you programmed in both?
What percentage have you programmed in C#? In VB.NET?

Some people make comments without experience in both, thus the differences
don't stand out to them.

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
Is there any difference between these "languages" any more or are they
just
syntactically different but represent the same thing? A long time ago VB
was
more for "noobs" while something like C++ was for experts. While you could
also do one thing in the other it wasn't always easy. Seems now that .Net
has made these languages fundamentally the same but only syntactically
different?

Jon


Sep 28 '06 #8

P: n/a

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
| "Jon Slaughter" <Jo***********@Hotmail.comwrote in message
| news:12*************@corp.supernews.com...
|
| Is there any difference between these "languages" any more or are they
| just syntactically different but represent the same thing? A long time
ago
| VB was more for "noobs" while something like C++ was for experts. While
| you could also do one thing in the other it wasn't always easy. Seems
now
| that .Net has made these languages fundamentally the same but only
| syntactically different?
|
| There is one fundamental difference - C# supports pointers / unmanaged
code
| and VB.NET doesn't.
C# is managed code only just like VB.NET, it allows for unsafe code
contructs which allow some (restricted) pointer usage, but unsafe !=
unmanaged.

Willy.


Sep 28 '06 #9

P: n/a

The differences in the languages are minor and sloan did a great job
summarizing them for 1.1 (most are no longer differences in 2.0).
However, we've found that there is a big difference in the _average_
VB.NET programmer vs the _average_ C# programmer.

C# programmers more often come from a C++ or Java background and are
more likely to have a strong understanding of CS in general and OOP in
particular.

VB.NET programmers more often come from a VB6 / VBScript background
and will often not have the same CS education and OOP experience.

Of course there are a log of great VB.NET developers out there, but
when talking about which language to choose for your organization the
programmers you'll attract by choosing C# vs VB.NET should be
something to consider.

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

(and yes we generally prefer a c# background over a vb.net background)

On Thu, 28 Sep 2006 13:28:04 -0500, "Jon Slaughter"
<Jo***********@Hotmail.comwrote:
>Is there any difference between these "languages" any more or are they just
syntactically different but represent the same thing? A long time ago VB was
more for "noobs" while something like C++ was for experts. While you could
also do one thing in the other it wasn't always easy. Seems now that .Net
has made these languages fundamentally the same but only syntactically
different?

Jon
Sep 28 '06 #10

P: n/a
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
C# is managed code only just like VB.NET, it allows for unsafe code
contructs which allow some (restricted) pointer usage, but unsafe !=
unmanaged.
You're right of course - I meant to say "unsafe"...

Apologies...
Sep 28 '06 #11

P: n/a
l just add my 2 cents...

ive been using both for a couple years now, and using each differs per
situation, C# is a nice language that has some advantages and disadvantages,
as with VB. with these languages i think it comes down to mainly preference.
The only big detail i can think of is that VB writes alot of code for you. VB
is not case sensitive, which can be good and can be bad. Ive found that the
VB compiler does a better job at finding all errors at once then the C# one.
It also gives the exact location of errors, which is nice. C# however, as
stated earlier, gives access to unsafe code, which can be very useful if used
properly and when needed.
--
-iwdu15
Sep 29 '06 #12

P: n/a

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
Is there any difference between these "languages" any more or are they
just syntactically different but represent the same thing? A long time ago
VB was more for "noobs" while something like C++ was for experts. While
you could also do one thing in the other it wasn't always easy. Seems now
that .Net has made these languages fundamentally the same but only
syntactically different?
Not really to do with the differences - others have pointed out some of
those - but I moved from VB6 to VB.Net, then to C#.NET.

I found the VB6 to VB.NET jump a bigger one than subsequently moving onto
C#, so that might indicate how much the differences are...?
Sep 29 '06 #13

P: n/a

I think the jump from VB6 to VB.NET is harder than the jump from VB6
to C#. The thing is with VB.NET people expect it to be just the next
version of VB and think things are the same but it's really a totally
different language with very different concepts. When transitioning
instead to C# the language itself is completely different as well so
people are expecting other changes and it's an easier transition.

Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Fri, 29 Sep 2006 16:49:58 +0100, "james" <ja***@com.comwrote:
>
"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
>Is there any difference between these "languages" any more or are they
just syntactically different but represent the same thing? A long time ago
VB was more for "noobs" while something like C++ was for experts. While
you could also do one thing in the other it wasn't always easy. Seems now
that .Net has made these languages fundamentally the same but only
syntactically different?

Not really to do with the differences - others have pointed out some of
those - but I moved from VB6 to VB.Net, then to C#.NET.

I found the VB6 to VB.NET jump a bigger one than subsequently moving onto
C#, so that might indicate how much the differences are...?
Oct 2 '06 #14

This discussion thread is closed

Replies have been disabled for this discussion.