473,320 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VB.NET or C#.NET ???

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
64 3015
"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
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
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
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
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
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

"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

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.