473,796 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.net or C#.net

Hi, I need some feedback.
We are converting to .Net and we are trying to decide on whether to use
VB.net or C#.net.
As far as our current systems, they will probably be rewritten in ASP.Net.
I have looked into both and I don't see anything that would scream out to
use one or the other. So at this point, it is still a toss up.
However, I want to look at the two languages from a different perspective.
That is from a career point of view.
Which has the larger install base. Which has more demand. Are developers in
one paid more than the other.

Any help would be appreciated.
Terry
Nov 22 '05
16 3849
I must agree that VB.Net is really so different from VB6 that maybe it should
have been named something different. Maybe B#, but I suppose musically speaking
that would make it the equivalent of C and that would have caused an uproar. Cb
would proly get it laughed at. Maybe V#?
I have also noticed quite a lot of VB6 programmers trying to make the switch
are just plain overwhelmed by VB.Net. I know I was.
FYI, to be CLS compliant I believe the sample of operator overloading should be:
Dim gamma as MyClass = MyClass.op_Addi tion(foo, bar)
But it is all symantics. Sadly, pre-Whidby VB.Net won't even honor the operators
on built-in classes/structures.
Even simple things like Point require this syntax.
pt2 = Point.op_Additi on(pt, sz) :-(

I was so poorly disappointed that VB.Net 2002/2003 was not what I thought it was
going to be. Really sounds like Whidby just might be what I've been waiting for,
but I will need to wait and see.

So, I fully agree with everything you have said. However, IMHO I have found
VB.Net to be a quite powerful and respectable language. More so than VB6, which
I also feel is awesome. But give me VB syntax with all the capabilities of Cxx,
and I'll be happy.

Gerald

"Thomas" <re**********@a nywhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
I fully disagree with people that say that VB.NET 2002/2003 is equivalent to
C#.NET 2002/2003. I was originally a high level VB6 developer. When I first
look at the original betas of .NET, I chose C# for a couple of reasons.
Firstly, Microsoft might as well have called VB.NET, "Fred". Only simple
syntatic similarities exist between VB6 and VB.NET. Other than that, they
are very different products. Secondly, VB.NET, for some idiotic reason, was
limited compared to C#. Silly things like unsigned integers were not
included. Lastly, as I began developing with C#, I discovered that VB.NET
had/has a HUGE limitation. VB.NET 2002/2003 cannot use operator nor
conversion overloads built in C#. That means if you build classes that are
to be used by other developers, those other developers cannot use VB.NET
either because they have to hack their code to death to utilize conversion
and operator overloads. For example:

Suppose someone in C# builds a couple of classes and overloads the "+"
operator. You could write the following:

MyClass foo = new MyClass();
MyClass bar = new MyClass();
MyClass gamma = foo + bar;

In VB.NET, they would have to write something like (not sure the exact
syntax):

Dim foo as MyClass = new MyClass();
Dim bar as MyClass = new MyClass();
Dim gamma as MyClass;

gamma = foo operator+ bar;

Insanity that VB.NET 2002/2003 cannot even *use* overloads built and
compiled in C#. So, prior to Whidbey, I would say that if you want to build
nothing but "Hello World" apps, you could use VB.NET, otherwise use C#. Note
that this opinion has absolutely nothing to do with performance which is the
same between VB.NET and C#.

Whidbey changes all that. Microsoft has added most of the new goodies to
VB.NET as well as C#. In addition, VB.NET 2005 includes operator overloads
so, theoretically, VB.NET developers can use components with operator
overloads built in C#. I'm not yet sure if VB.NET can use conversion
overloads written in C#.


Thomas

"Terry" <xx************ @yahoo.com> wrote in message
news:e8******** ******@TK2MSFTN GP09.phx.gbl...
Hi, I need some feedback.
We are converting to .Net and we are trying to decide on whether to use
VB.net or C#.net.
As far as our current systems, they will probably be rewritten in ASP.Net.
I have looked into both and I don't see anything that would scream out to
use one or the other. So at this point, it is still a toss up.
However, I want to look at the two languages from a different perspective.
That is from a career point of view.
Which has the larger install base. Which has more demand. Are developers

in
one paid more than the other.

Any help would be appreciated.
Terry


Nov 22 '05 #11
Hi Thomas,

Is overloading the operator that important for you that your complete
message is bassed on that, C# cannot use optional parameters as with VBNet
however that are differences in the marge of a thousands of the promilage
of the use in the world in my opinion.

Just my thought,

Cor
Nov 22 '05 #12
You asked, "Is operator overloading that important?" My answer, yes. The
primary reason is if you are building business classes that will be reused
by other developers, you want to define what >, <, etc do in the business
class. Optional parameters are really a convenience of method calling.
However, operator overloads present a serious potential for mistake by other
developers. For example, if developers do this:

MyClass foo;
MyClass bar;

if (foo == bar)
//do work

If MyClass represents a business object that has pulled data from the
database, this may indeed represent the same record in the db, but obviously
won't represent the same address in memory and thus will return false.
That's an error that will compile and may be difficult to catch.

I would put conversion overloads in the same category as optional
parameters. They are both contrivances of convenience. They save the
developer a little code. Requiring developers to explicitedly cast
everything, while inconvenient, won't lead to logic errors. Requiring C#
developers to find the overload that matches the optional arg signature they
want, while annoying, doesn't really produce logic errors.

Thomas
"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:uT******** ******@TK2MSFTN GP10.phx.gbl...
Hi Thomas,

Is overloading the operator that important for you that your complete
message is bassed on that, C# cannot use optional parameters as with VBNet
however that are differences in the marge of a thousands of the promilage of the use in the world in my opinion.

Just my thought,

Cor

Nov 22 '05 #13
Hi Thomas,

A few things. First, I know I've heard one of the VB team members (I think
it was Paul Vick or Amanda Silver on .NET Rocks!) say that VB.NET was going
to have unsinged numeric types but they did not implement because the C#
team had decided not to. Then the C# team changed their mind and added them
very late, too late for the VB team to included them.

Secondly, VB.NET 1.0 and 1.1 can use overloaded operators. The syntax isn't
the most lovely but it works. From your example you would use: gamma =
foo.op_Addition (bar)

Lastly, I don't think the fact that VB.NET has a not-so-elegant way of
handling operator overloading means that it's only good for "Hello World"
apps. There are things that are nicer to do in C# and there are things that
are nicer to do in VB.NET (interop with Office apps being the classic
example), but there are *very* few things that one language can do that the
other can't.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Thomas" <re**********@a nywhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
I fully disagree with people that say that VB.NET 2002/2003 is equivalent to C#.NET 2002/2003. I was originally a high level VB6 developer. When I first look at the original betas of .NET, I chose C# for a couple of reasons.
Firstly, Microsoft might as well have called VB.NET, "Fred". Only simple
syntatic similarities exist between VB6 and VB.NET. Other than that, they
are very different products. Secondly, VB.NET, for some idiotic reason, was limited compared to C#. Silly things like unsigned integers were not
included. Lastly, as I began developing with C#, I discovered that VB.NET
had/has a HUGE limitation. VB.NET 2002/2003 cannot use operator nor
conversion overloads built in C#. That means if you build classes that are
to be used by other developers, those other developers cannot use VB.NET
either because they have to hack their code to death to utilize conversion
and operator overloads. For example:

Suppose someone in C# builds a couple of classes and overloads the "+"
operator. You could write the following:

MyClass foo = new MyClass();
MyClass bar = new MyClass();
MyClass gamma = foo + bar;

In VB.NET, they would have to write something like (not sure the exact
syntax):

Dim foo as MyClass = new MyClass();
Dim bar as MyClass = new MyClass();
Dim gamma as MyClass;

gamma = foo operator+ bar;

Insanity that VB.NET 2002/2003 cannot even *use* overloads built and
compiled in C#. So, prior to Whidbey, I would say that if you want to build nothing but "Hello World" apps, you could use VB.NET, otherwise use C#. Note that this opinion has absolutely nothing to do with performance which is the same between VB.NET and C#.

Whidbey changes all that. Microsoft has added most of the new goodies to
VB.NET as well as C#. In addition, VB.NET 2005 includes operator overloads
so, theoretically, VB.NET developers can use components with operator
overloads built in C#. I'm not yet sure if VB.NET can use conversion
overloads written in C#.


Thomas

"Terry" <xx************ @yahoo.com> wrote in message
news:e8******** ******@TK2MSFTN GP09.phx.gbl...
Hi, I need some feedback.
We are converting to .Net and we are trying to decide on whether to use
VB.net or C#.net.
As far as our current systems, they will probably be rewritten in ASP.Net. I have looked into both and I don't see anything that would scream out to use one or the other. So at this point, it is still a toss up.
However, I want to look at the two languages from a different perspective. That is from a career point of view.
Which has the larger install base. Which has more demand. Are developers

in
one paid more than the other.

Any help would be appreciated.
Terry


Nov 22 '05 #14
> apps. There are things that are nicer to do in C# and there are things
that
are nicer to do in VB.NET (interop with Office apps being the classic
example), but there are *very* few things that one language can do that the other can't.


What, in your opinion, makes VB.Net nicer for interop with Office apps? I'm
doing some of it in a VB.Net application of my own, but I didn't notice
anything about doing it in VB that seemed any different or easier than it
would have been if I'd been doing it in C#. Add a reference to the Outlook
11.0 Object Library, do a using for the namespace, and hi ho off we go. Did
I miss something important?

Thanks,
Tom Dacon
Dacon Software Consulting

Nov 22 '05 #15
Tom Dacon <td****@communi ty.nospam> wrote:
apps. There are things that are nicer to do in C# and there are things

that
are nicer to do in VB.NET (interop with Office apps being the classic
example), but there are *very* few things that one language can do that

the
other can't.


What, in your opinion, makes VB.Net nicer for interop with Office apps? I'm
doing some of it in a VB.Net application of my own, but I didn't notice
anything about doing it in VB that seemed any different or easier than it
would have been if I'd been doing it in C#. Add a reference to the Outlook
11.0 Object Library, do a using for the namespace, and hi ho off we go. Did
I miss something important?


I gather optional parameters and late binding can make interop with
Office significantly easier. That's just what I've heard though - I
haven't done any myself.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #16
See inline below...
Secondly, VB.NET 1.0 and 1.1 can use overloaded operators. The syntax
isn't
the most lovely but it works. From your example you would use: gamma =
foo.op_Addition (bar)
I wish people would get in the habit of assuming that someone else will use
their code. Technically, yes VB can use operator overloads. However, that
assumes that the VB developer knows they exist. The odds are much higher
that the VB developer will not know they are there and try to wire up their
own special function that does the same thing as the overload. Of course,
later down the line it will be far from obvious why a change in the overload
logic doesn't affect the VB developer's code.

Lastly, I don't think the fact that VB.NET has a not-so-elegant way of
handling operator overloading means that it's only good for "Hello World"
apps.
IMHO, the statement "isn't the most lovely but it works" is the same as "a
not-so-elegant way" is the same as "insane vbonics solution that will cause
nasty hard-to-detect bugs when people use my code".

Think of the scenario: you want to build 1.x components that will be used by
other developers in an enterprise. If you use C#, your developers can easily
utilize a greater percentage of the CLR. In addition, you make operator
overloads such that your GUI developers do not even need to know they exist.

If you have some developers using VB in your company, then you have to code
everything to the CLS and you lose the ability to create *seemless* operator
overloads.

There are things that are nicer to do in C# and there are things that
are nicer to do in VB.NET (interop with Office apps being the classic
example), but there are *very* few things that one language can do that
the
other can't.
I completely agree that there are somethings that are easier to do in
VB.NET. However, assuming that your VB people will use your C# operator
overloads is a bug waiting to happen.

With all that said, I still can't fathom why VB.NET cannot *use* operator
overloads seemlessly. I can understand why VB developers might not want
them, but I fail to understand why VB.NET can't use them if they are in a
compiled C# dll. Doesn't it read the MSIL and see that C# has overloaded the
"+" operator?

Thomas


--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Thomas" <re**********@a nywhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
I fully disagree with people that say that VB.NET 2002/2003 is equivalent

to
C#.NET 2002/2003. I was originally a high level VB6 developer. When I

first
look at the original betas of .NET, I chose C# for a couple of reasons.
Firstly, Microsoft might as well have called VB.NET, "Fred". Only simple
syntatic similarities exist between VB6 and VB.NET. Other than that, they
are very different products. Secondly, VB.NET, for some idiotic reason,

was
limited compared to C#. Silly things like unsigned integers were not
included. Lastly, as I began developing with C#, I discovered that VB.NET
had/has a HUGE limitation. VB.NET 2002/2003 cannot use operator nor
conversion overloads built in C#. That means if you build classes that
are
to be used by other developers, those other developers cannot use VB.NET
either because they have to hack their code to death to utilize
conversion
and operator overloads. For example:

Suppose someone in C# builds a couple of classes and overloads the "+"
operator. You could write the following:

MyClass foo = new MyClass();
MyClass bar = new MyClass();
MyClass gamma = foo + bar;

In VB.NET, they would have to write something like (not sure the exact
syntax):

Dim foo as MyClass = new MyClass();
Dim bar as MyClass = new MyClass();
Dim gamma as MyClass;

gamma = foo operator+ bar;

Insanity that VB.NET 2002/2003 cannot even *use* overloads built and
compiled in C#. So, prior to Whidbey, I would say that if you want to

build
nothing but "Hello World" apps, you could use VB.NET, otherwise use C#.

Note
that this opinion has absolutely nothing to do with performance which is

the
same between VB.NET and C#.

Whidbey changes all that. Microsoft has added most of the new goodies to
VB.NET as well as C#. In addition, VB.NET 2005 includes operator
overloads
so, theoretically, VB.NET developers can use components with operator
overloads built in C#. I'm not yet sure if VB.NET can use conversion
overloads written in C#.


Thomas

"Terry" <xx************ @yahoo.com> wrote in message
news:e8******** ******@TK2MSFTN GP09.phx.gbl...
> Hi, I need some feedback.
> We are converting to .Net and we are trying to decide on whether to use
> VB.net or C#.net.
> As far as our current systems, they will probably be rewritten in ASP.Net. > I have looked into both and I don't see anything that would scream out to > use one or the other. So at this point, it is still a toss up.
> However, I want to look at the two languages from a different perspective. > That is from a career point of view.
> Which has the larger install base. Which has more demand. Are
> developers

in
> one paid more than the other.
>
> Any help would be appreciated.
> Terry
>
>



Nov 22 '05 #17

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

Similar topics

3
11248
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) on the server because of that. Our site will have an SSL certificate next week, so I would like to use AIM instead of SIM, however, I don't know how to send data via POST over https and recieve data from the Authorize.net server over an https...
2
5844
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 to execute the code until the browser send his reply to the header instruction. So an exit(); after each redirection won't hurt at all
3
23040
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 field is completed.
0
8497
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. 354 roberto@ausone:Build/php-4.3.2> ldd /opt/php4/bin/php libsablot.so.0 => /usr/local/lib/libsablot.so.0 libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 libm.so.1 => /usr/lib/libm.so.1
1
8611
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 column below. The viewer can select states from the drop down lists above the other two columns as well. If the viewer selects only one, only one column fills. If the viewer selects two states, two columns fill. Etc. I could, if appropriate, have...
4
18307
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 user comes back to a page where he had a submitted POST data the browser keeps telling that the data has expired and asks if repost. How to avoid that? I tried registering all POST and GET vars as SESSION vars but
1
6870
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 http://www.mis.gla.ac.uk/biquery/training/ but each of the courses held have maximum of 8 people that could be
2
31445
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 to :parameter I dont like the idea of making the SQL statement on the fly without binding parameters as I dont want a highly polluted SQL cache.
3
23603
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 results of the picture half the size. The PHP I have installed support 1.62 or higher. And all I would like to do is take and image and make it fit a 3x3. Any suggestions to where I should read or look would be appreciated.
0
9531
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10237
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10187
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10018
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6795
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.