VB vs C#

  • Thread starter Thread starter Rena
  • Start date Start date
Correction... I didn't mean to overstate the usage of VB or non-C
languages... I know full well that pretty much all major technologies and
platforms are written in C/C++... including the Java runtime. I was speaking
about business objects, database front-ends, office automation, etc.
 
Oh, I agree, the differences are largely just syntactic sugar. Many of the
items on my list can be duplicated by the other language without too much
difficulty. I don't believe that one language is "better" than the other in
general. Sometimes one is better in a specific circumstance. For example, I
generally use VB.NET when calling COM components authored in VB6, since it's
support for optional parameters makes this easier. Similarly, I generally
use C# when interfacing with Windows API's and C++ COM objects, since
unsafe, unsigned & checked/unchecked make this easier.

I used to be a VB.NET developer who occasionally used C#, now I'm a C#
developer who occasionally uses VB.NET. There's no real point getting hung
up by one language or another if their underlying base is identical. Use the
best tool for the job. Hell, I even occasionally use MC++, but it makes my
nose bleed ;D
 
"Gerry Hickman"
..
Yes, but as we discussed earlier, it's not about making personal choices;

Exactly read your own message again. There is not much stated on facts in
that.
(Those needs official references with numbers and than not only local facts
however world wide facts)

just my 2 eurocents

Cor
 
Chris said:
Which is powerful the .net or c#....?

You're comparing apples and oranges. .NET is a platform on which .NET
executables run, and C# is one of the languages which produces .NET
executables.

-------------------------------------------------------------------------------

".NET stikes C# in the bytecode! And then follows up with a CAS revocation!"
"Oooh that's gotta hurt Jim!"
"I agree Ralph, I haven't seen a language look this down since they
announced My Namespaces for VB!"
"But wait, wait, C# jumps back in the ring and is demanding a stack walk!
And the umpire's given it to him! He's following up with some dextrous
unsafe code blocks and a fine piece of AppDomain instantiation!"

;-)
 
Hi CMM,
Correction... I didn't mean to overstate the usage of VB or non-C
languages...

I knew what you meant!
I know full well that pretty much all major technologies and
platforms are written in C/C++... including the Java runtime. I was speaking
about business objects, database front-ends, office automation, etc.

OK, well my view on this is that anyone who wrote "business objects" in
VB6 made a mistake, and now they're paying for it. Database front-ends
written in VB or VB.NET (in my view) tend to be "beginner" front-ends.
We have a strict policy against it in all businesses I'm involved with.
All front-ends must be written in conformance with the W3C so that
they'll work on any computer with any browser from anywhere in the
world. How do you get a VB "front-end" working in an internet cafe in
China that's got Mozilla installed for example?

Office Automation is an interesting one. The guys in the next office
block from me have lot's of VBA and it's a nightmare - hard-coded into
actual databases and speadsheets. Some is in VB6, and so on.

I, on the other hand, use JScript and have managed to avoid all the
constant changes they keep making on the client side. My automation
stuff "just works", regardless of what version of office they've got, or
what service packs etc are installed. It's similar with Excel, there's
no silly security warnings annoying the user like wot U see if trying to
use dumbo "Macros" and "VB Projects".

I like the easy life!
 
Hi Sean,
"C# is one of the languages which produces .NET executables."

so it means if we wrote VB .net code and generate the executable, it is
first convert to C# then to C# executable?


Thanks
 
Rena said:
Hi Sean,
"C# is one of the languages which produces .NET executables."

so it means if we wrote VB .net code and generate the executable, it is
first convert to C# then to C# executable?


Thanks
No. Source code written in *any* .NET language is compiled to MSIL
(Microsoft Intermediate Language). There is no translation through C# from
VB. The MSIL is interpreted by and run through the .NET Framework.
 
The sentence says "ONE of the languages"...ie, there are several others that
do the same thing.

-sb
 
Only a little additon to what Peter wrote.

With a .Net language is in this message as often meant a language that
builds .Net managed code.

C++ is a Visual.Studio.Net language however can do both.

Cor
 
hi i would like 2 thanks u for giving some information about vb. may u favour
me in this (e-mail address removed)
 
Hi,

I guess we have all agreed that no language is better than the other, and it
depends more on what you want to do and you personal preference. There might
be some specialized requirements which mandate the use of a certain language
(C++.Net, and to a lesser extent C#)

For me, other than my personal preference for C++ style coding, these are
the other reasons for chosing C# (in no particular order of importance)
1. Mono has an excellent C# compiler. And it is pretty mature. So my
application will run on Linux.
2. The number of C# samples available are more. Tool/Component developers
often come from a C++ background and hence write their samples in C#.
3. Most open source projects are in C#. Even Microsoft's own Rotor is.
SharpDevelop is another example.(DotNetNuke is an exception.)
4. What if we need to write unsafe code in future? I might also need to
write a performance critical loop, with pointers. We all try to stay away
from it, but as a last resort. It is always better to have options.
5. Interesting features seem to be introduced first on C#. I tend to use
"using" a lot, which is coming to VB.Net 2005.
6. Co-variance/Contra-variance in Whidbey

Thanks,
Jeswin P.
(http://cyberjessy.blogspot.com)
 
Back
Top