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

VB.NET or C#.NET ???

P: n/a
Hello,

I would like to ask you this question. I am experienced in programming
in VBA and I want to upgrade my knowledge to Visual Studio 2005 now. I
hesitate whether to aim to VB or C#. Since I am familiar with VBA I
would like to choose VB but I heart from my colleagues that VB is a
"dead" language and it will probably not be included in the next
versions of Visual Studio anymore. Their other objection against VB is
that VB is not object-oriented language in fact and that it does not
offer such possibilities in OOP as C# does. On the other hand they
appreciate an ease of VB syntax.

I have to add that I would like to use VB or C# as front-ends to large
DBs placed on SQL server.

Thank you for your opinions!

Milan

Feb 12 '06
Share this Question
Share on Google+
64 Replies


P: n/a
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
schrieb:
I agree about the underscore used in the line endings. That's always been
a pest. However, as far as the other comment of the reserved words, you
must remember that since the beginning, basic and visual basic has always
strived to be the "readable" language. MustInherit and Overrides is more
understandable when reading code than Abstract and Virtual (not to mention
Static, Void, and others...)


I beg to differ , all the books about OOP use abstract and virtual in
fact I think that VB.net is the only mainstream language that do not use
that words for the conpcets they represent.


Well, take inheritance of another sample. VB uses 'Inherits', Java and J#
use 'extends' and C# uses ' : '. Which one is the best? Did anybody count
the number of occurances of each of the terms in OOP books? I think the
primary goal is consistency inside of each programming language's syntax
followed from choosing appropriate self-explaining terms instead of using
stupid and sub-optimal terms which have been carried forward for
compatibility reasons for decades.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 13 '06 #51

P: n/a
Isgnacio,

You are consequently talking about other languages. What languages do you
mean. The set of languages you are in my opinion talking about is really
small and is hug only because it exist in so many different tastes.

See this schema where they for this languages had to stretch the schema.

http://www.levenez.com/lang/history.html#01

The languages you referring too can not tip to the consistent language as
Basic (and more). However have some legacy behaviour (needed for backward
compatibility in what is written about it). What should not mean in my
opinion that a new language should inherit that legacy in the same way as a
new root in that family should not avoid to keep using that legacy/backward
cmpatibility..

If it was as you write, than English speaking people would still eat *flesh*
instead of *meat*.

Cor
Feb 13 '06 #52

P: n/a
Jon and Terry,
Where did anyone complain about the choice of character? As I read it,
the complaint was that it was necessary to use anything at all to
signify a continuation onto the next line, not the particular character
chosen to represent it.

Sorry, I have read this
*one you have to use the pesky _ at the end*

My English is of course not as good as you Brittains, however I think that I
understood very well what is written.

By the way, in this do you or to use a *contiunation* character or an *end*
character, which natural would be the hyphen and the dot. I think that it is
not needed to explain for you that both don't really fit.

Cor
Feb 13 '06 #53

P: n/a
Cor Ligthert [MVP] <no************@planet.nl> wrote:
Jon and Terry,
Where did anyone complain about the choice of character? As I read it,
the complaint was that it was necessary to use anything at all to
signify a continuation onto the next line, not the particular character
chosen to represent it.
Sorry, I have read this
*one you have to use the pesky _ at the end*

My English is of course not as good as you Brittains, however I think that I
understood very well what is written.
Sorry, but I think you've misunderstood. If someone were to write
(about C#) "I can't stand all those pesky semi-colons at the end of
statements" I would understand them to mean that they would prefer to
not have to use any statement termination symbol at all, not that
they'd prefer a different character.
By the way, in this do you or to use a *contiunation* character or an *end*
character, which natural would be the hyphen and the dot. I think that it is
not needed to explain for you that both don't really fit.


Now it's my turn to not understand. I've no idea whether you've just
asked me to do something or not, or what it is if you *are* asking me
to do something.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 14 '06 #54

P: n/a
Cor Ligthert [MVP] <no************@planet.nl> wrote:
Hang on a sec - you say that someone who likes C# shouldn't criticise
VB.NET, but you're quite happy (as someone who likes VB.NET) to
criticise the choice of keywords in C#? That doesn't seem entirely fair
to me.
No I do not, you probably forgot the text I wrote (see below).


Which part are you arguing with? It seems fairly clear to me - you've
criticised C#'s choice of keywords, and said at the same time that no-
one with a preference for C# should criticise VB.NET's choice of
keywords.
By the way, I
don't find C# a bad program language, I don't know where you got that idea.
I never claimed you did find C# a bad program language.
I find at least for UI type programs VBNet better, which text means direct
that there are in my opinion things that can better be done with C# or any
other C language.


That's a logical fallacy. I could make up a language (call it BadJon,
for instance) which is terrible at *everything*. By your logic, saying
that VB.NET is better than BadJon for UI programs implies that BadJon
is better than VB.NET at other things. There's just no such
implication.
I have not any problem by the way with Static in C# because that is used
because of legacy reasons. However I am glad they took (because they
were
able to do that) another word meaningful word in VBNet for that.


For you is legacy maybe a bad word, for me it is affected with backward
compatibility. Maybe should I have used that. However I could not resist :-)


I have no problem with the word "legacy". What I *do* have an objection
to is the idea that the validity of a criticism of any language is
dependent on the person making that criticism. How can that possibly be
so? If we were to write exactly the same sentence about a particular
VB.NET keyword, why would it be any more true when you wrote it than
when I wrote it?

While we're talking about "static" however, consider this: VB.NET
itself uses the keyword "Static", and it neither means the same as C#'s
static, nor does it mean that it has "non-changeable content". It means
the same as static does in C *for a local variable*.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 14 '06 #55

P: n/a
In C and C# you must use a semi-colon to indicate the end of a statement.
This allows statements to continue across multiple lines without a
continuation character. In VB, statements are only one line long unless
they have a continuation character. Both languages support multiple
statements on a single line - C# via adding a statement after the semi-colon
and VB by adding a colon between statements. This is a syntax issue only,
but it plays directly into readability of the language. Which one you like
depends on your preferences.

Mike Ober.

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Cor Ligthert [MVP] <no************@planet.nl> wrote:
Jon and Terry,
Where did anyone complain about the choice of character? As I read it,
the complaint was that it was necessary to use anything at all to
signify a continuation onto the next line, not the particular character chosen to represent it.
Sorry, I have read this
*one you have to use the pesky _ at the end*

My English is of course not as good as you Brittains, however I think

that I understood very well what is written.


Sorry, but I think you've misunderstood. If someone were to write
(about C#) "I can't stand all those pesky semi-colons at the end of
statements" I would understand them to mean that they would prefer to
not have to use any statement termination symbol at all, not that
they'd prefer a different character.
By the way, in this do you or to use a *contiunation* character or an *end* character, which natural would be the hyphen and the dot. I think that it is not needed to explain for you that both don't really fit.


Now it's my turn to not understand. I've no idea whether you've just
asked me to do something or not, or what it is if you *are* asking me
to do something.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Feb 14 '06 #56

P: n/a

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
: wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
: H,
:
:
: The only thing I do not understand why is still in place is that VB.net
: demand than the entire sentence be written in one line, if you want to
: split it in more than one you have to use the pesky _ at the end, I
: can't understand why that has been dragged all along.
I look at it this way. I rarely need to wrap code across multiple lines -
most of the code I write is single line statements or block statements. In
VB, I don't have to concern myself with making sure to mark the end of every
line of code when I'm finished with it as I do in C#. I simply press the
enter key (which I am also obligated to do in C# as well anyway) and move to
the next line. I find the constant need for the trailing ';' characters in
C# to be a far more pesky than the occasional '_' character in VB. Besides,
if VB were to do away with the new-line character as the terminator, then
they'd have to replace it with a variation of the C ";" approach. What would
be the point of that?
Of course, when I actually do get into a C# or Java project, I stop noticing
the fact that I'm constantly pressing the ";" key and just do it. It becomes
second nature almost immediately. So too in VB - about the only time I
routinely wrap lines is in multi-parameter function statements and the
occasional string concatenation. As with the ";" character in C#, I really
don't notice the "_" character after the first pass or so. As with most
things regarding VB vs. C#, this is simply a matter of style and has nothing
to do with the languages themselves.
: Also IMO they made weird selection for the new reserved words (
: overridable, mustinherit , etc ) instead of the set of them used in
: most other languages ( abstract , virtual, etc ) almost like if they
: wanted to looks diferent from the rest of the languages.
It seems to me that VB (and basic before it) has always been written in such
a way that it is largely self documenting. The keywords of VB.net strike me
as keeping with that trend. In VB, if you must inherit a class, it is marked
as "MustInherit". That strikes me as being much more self-evident statement
than the keyword "abstract" used in elsewhere. In this same vein, I think
declaring functions or members of a class as "Shared" is much clearer than
flagging them as "static" (implying they never change which of course they
can). The reserved keywords of VB are only weird when you are first
introduced to them.
That said, I am English speaking and so I find the language construction of
VB very natural and obvious. I recognize that someone who does not speak
English may not share in that assessment. Even so, C#, like C/C++ and Java
before it, are also based on English terminology (switch, case, for, if,
break, continue, abstract, event, private, protected, class, structure,
object, etc., etc.). Therefore, I don't think that learning VB for the non
English speaking programmer is significantly harder than learning C# on that
particular basis.
Ralf
--
--
----------------------------------------------------------
* ^~^ ^~^ *
* _ {~ ~} {~ ~} _ *
* /_``>*< >*<''_\ *
* (\--_)++) (++(_--/) *
----------------------------------------------------------
There are no advanced students in Aikido - there are only
competent beginners. There are no advanced techniques -
only the correct application of basic principles.
Feb 14 '06 #57

P: n/a

"Milan" <mi************@centrum.cz> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I would like to ask you this question. I am experienced in programming
in VBA and I want to upgrade my knowledge to Visual Studio 2005 now. I
hesitate whether to aim to VB or C#.
Supposedly C# programmers earn more $$$ than VB programmers.
Since I am familiar with VBA I
would like to choose VB but I heart from my colleagues that VB is a
"dead" language


Nope. Bill G still likes Basic. It is also much better at self documenting
than any other language.



Feb 14 '06 #58

P: n/a
Michael D. Ober <obermd.@.alum.mit.edu.nospam> wrote:
In C and C# you must use a semi-colon to indicate the end of a statement.
This allows statements to continue across multiple lines without a
continuation character. In VB, statements are only one line long unless
they have a continuation character. Both languages support multiple
statements on a single line - C# via adding a statement after the semi-colon
and VB by adding a colon between statements. This is a syntax issue only,
but it plays directly into readability of the language. Which one you like
depends on your preferences.


Absolutely. There are definitely swings and roundabouts. As an
anonymous poster wrote, there are far more lines *without*
continuations than ones *with* - but then again, not being quite as
white-space sensitive makes it easier to cut and paste code in C#, and
encourages lines to be wrapped more often. (i.e. in VB.NET there's more
of a temptation to try to get a statement onto one line so as to avoid
the continuation character. Not much more, but a little bit...)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 14 '06 #59

P: n/a
Homer J Simpson <no****@nowhere.com> wrote:
Since I am familiar with VBA I
would like to choose VB but I heart from my colleagues that VB is a
"dead" language


Nope. Bill G still likes Basic. It is also much better at self documenting
than any other language.


I've heard that said before, but never been given any evidence for it.
Of course, in VS.NET 2003, if you're using VB.NET you can't produce XML
documentation without extra plug-ins, so your code had *better* be
self-documenting... (I'm not sure why it was missed out of VB.NET to
start with - I'm very glad it's finally here in VS 2005.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 14 '06 #60

P: n/a
In addition, although this is not something that should be done very often,
it allows one to put multiple statements on the same line, and thus compact
your code a bit. There are a few situations where this comes in handy, such
as in switch statements.

switch (foo)
{
case (1): someFunction(); break;
case (2): SomeOtherFunction(); break;
//...
}

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Michael D. Ober <obermd.@.alum.mit.edu.nospam> wrote:
In C and C# you must use a semi-colon to indicate the end of a statement.
This allows statements to continue across multiple lines without a
continuation character. In VB, statements are only one line long unless
they have a continuation character. Both languages support multiple
statements on a single line - C# via adding a statement after the
semi-colon
and VB by adding a colon between statements. This is a syntax issue
only,
but it plays directly into readability of the language. Which one you
like
depends on your preferences.


Absolutely. There are definitely swings and roundabouts. As an
anonymous poster wrote, there are far more lines *without*
continuations than ones *with* - but then again, not being quite as
white-space sensitive makes it easier to cut and paste code in C#, and
encourages lines to be wrapped more often. (i.e. in VB.NET there's more
of a temptation to try to get a statement onto one line so as to avoid
the continuation character. Not much more, but a little bit...)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Feb 14 '06 #61

P: n/a
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
escribió en el mensaje news:e7*************@TK2MSFTNGP10.phx.gbl...
I would suggest the opposite, start with C# , it will be a slower start
but you will not "inherit" the bad habits you adquire using VBA , you
start freshly with a complete new set of concepts and way to write code.
I have seen a good amount of VERY BAD VB.NET code that scream it was
written by somebody who changed from VB6 to VB.NET in a similar way that
when they changed from VB5 to VB6


The bad habits are not attached to the language (at least most of them), but
to the programmer, and they will be carried to any new language. Even if
they are not bad habits but just ignorance, say, not using inheritance
because it did not exist in VBA/VB6, he will not be using it just because of
choosing C# and not VB.NET.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

Feb 14 '06 #62

P: n/a
Kevin,

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> schrieb:
In addition, although this is not something that should be done very
often, it allows one to put multiple statements on the same line, and thus
compact your code a bit. There are a few situations where this comes in
handy, such as in switch statements.

switch (foo)
{
case (1): someFunction(); break;
case (2): SomeOtherFunction(); break;
//...
}


That's what VB.NET has the ':' for:

\\\
Bla() : Foo() : i = i + 12 : Goo(1, 2, 3)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 14 '06 #63

P: n/a
Darn, Herfried, it's been so long I forgot! I must be getting rusty with my
VB.Net!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Ob**************@tk2msftngp13.phx.gbl...
Kevin,

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> schrieb:
In addition, although this is not something that should be done very
often, it allows one to put multiple statements on the same line, and
thus compact your code a bit. There are a few situations where this comes
in handy, such as in switch statements.

switch (foo)
{
case (1): someFunction(); break;
case (2): SomeOtherFunction(); break;
//...
}


That's what VB.NET has the ':' for:

\\\
Bla() : Foo() : i = i + 12 : Goo(1, 2, 3)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 14 '06 #64

P: n/a
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> schrieb:
Darn, Herfried, it's been so long I forgot! I must be getting rusty with
my VB.Net!


No problem. Personally I do not like the ':' statement separator ;-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 14 '06 #65

64 Replies

This discussion thread is closed

Replies have been disabled for this discussion.