Which to use VB.NET or C#?

  • Thread starter Jon S via DotNetMonster.com
  • Start date
J

Jon S via DotNetMonster.com

Hi all,

I'm planning on developing an ASP.NET web site. I know both VB.NET and C#
but am unsure on which would be more useful to develop an ASP.NET site with?
Also I maybe looking to become a web developer in the future so it would help
if I use the langauge that most companies use to develop their ASP.NET site?

Many thanks,
Jon.
 
K

Karl Seguin

Nice way to start a flame war.

It doesn't matter. You can achieve teh same greatness and horor in either
language. I might guess that C# is a more popular for employers, but if you
really do know both as you say, keep ur skills in both updated 'cuz you
never know.

Karl
 
M

Mantorok

It's entirely based on preference, some people prefer VB, some prefer C#.

It's that simple, also because the main learning curve is the Framework
itself, once you pick up one language, you will pick up the other very
quickly, it's mostly syntactical.

Kev
 
A

Alex D.

if you know both syntaxes and you know the framework and the asp.net then
you should have no problem working with both c#.net and vb.net

alex.
 
K

Kevin Spencer

In your case, I would recommend VB.Net.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
J

JIMCO Software

Jon said:
Also I maybe looking to become a web developer in
the future so it would help if I use the langauge that most companies
use to develop their ASP.NET site?

I have worked with a ton of developers for big companies during the history
of ASP.NET and the majority of them are using C#.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
J

Jon Paal

if you are capable, and know hown to code by hand, then VB.net .

If you are still dependent on Visual Studio, then use C#
 
W

WJ

Jon Paal said:
if you are capable, and know hown to code by hand, then VB.net .

If you are still dependent on Visual Studio, then use C#

C# can be written using Windows.NotePad and or Unix/Linux.vi editors. You do
not need to use VS.Net to code c# programs. These text editors train your
brain to be a very c-sharper !

John
 
S

Steve C. Orr [MVP, MCSD]

If you plan to stick primarily with ASP.NET development then I'd have to
give the edge to VB.NET.
But keep your skills up to date with C# as much as you can just to hedge
your bets.
 
J

Jesse Liberty

Normally I side-step the language wars as I have books on both C# and
VB.NET/VB2005, but your message does provoke a certain response.

1. I'm not convinced at all that the "capable" programmer is better off with
VB rather than C# (or the other way round, for that matter)

2. I personally believe that coding by hand (rather than using Visual
Studio) is an enormous waste of developer time with little or no benefit,
and lots of drawbacks.

After 5 years of non-stop .NET programming I'm pleased to say that I'm
hopelessly "dependent" on VStudio for its integrated IDE, its excellent
debugger, its terribly useful and programmer efficiency enhancing
Intellisense, its general ability to help manage projects and its incredibly
useful suite of tools. Now that nearly all the tool-generated code is
"hidden" in partial classes, it is even more useful.

I program in notepad (or whatever) every once in a while: to demonstrate to
a class that it can be done and why it is (in my humble opinoin) a terrible
idea to do so.

The reality is that C# and VB.NET produce equally good and equally
maintainable code and the difference between them is syntactic sugar.
 
W

WJ

Jesse Liberty said:
2. I personally believe that coding by hand (rather than using Visual
Studio) is an enormous waste of developer time with little or no benefit,
and lots of drawbacks.

Well, if you develope a rich UI either in Web or Win form in a hurry, then
yes, you would need an IDE such as VS.Net. But if you just develope a class
library, then notepad/vi are good enough since there is no graphical
interface needed for most class library. And you can compile the entire
library using dos command (.net command).

John
 
J

JIMCO Software

Jesse said:
The reality is that C# and VB.NET produce equally good and equally
maintainable code and the difference between them is syntactic sugar.

There are capabilities in C# that don't exist in VB.NET. For example, you
cannot use VB.NET to write unsafe code blocks. You can in C#. If you have
the need to use pointers, you can in C#. You cannot in VB.NET.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
J

JIMCO Software

WJ said:
But if you just
develope a class library, then notepad/vi are good enough since there
is no graphical interface needed for most class library. And you can
compile the entire library using dos command (.net command).

Why would anyone want compile at the command line? In VS.NET, I can build a
class in 2 seconds. In command line, it would take many times longer.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
K

Kevin Spencer

Why would anyone want compile at the command line? In VS.NET, I can build
a class in 2 seconds. In command line, it would take many times longer.

I can remember when I first started teaching myself to program in C, and by
reason of my (extreme lack of) finances, I used freeware command-line
compilers written for K&R C. I can see how someone of no financial means
might want to do so, therefore. Been there. Done that. Fortunately today,
the .Net Framework is free, and comes with command-line compilers for
hobbyists, the less financially "fortunate," and the misguided "purists."

However, as a professional, and the programming biz being highly competitive
as well as high-pressure, I don't see how anyone could compete in the
marketplace without tools like Visual Studio. It's all about productivity.

When I was a carpenter, back in Skokie Indiana, I learned a valuable lesson
from my boss. He told me that, to succeed in the carpentry biz, I should
pick up new tools as often as possible. Now that I build software instead of
houses for a living, I have found that advice even more appropriate.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
J

Juan T. Llibre

re:
Why would anyone want compile at the command line?

Until VS.NET 2005, there was no way to compile
a class library *except* from the command line.

Even now, if using VS.NET 2005, I'd want to compile any classes
I write -from the command line- and not place my text-based
source code in the App_Code directory, where prying fingers
can easily pick up my coding secrets.

Whoever dreamed up the App_Code directory
abomination should be gunh by his you-know-whats.

The App_Code directory is a security risk.
 
J

Juan T. Llibre

re:
Until VS.NET 2005, there was no way to compile
a class library *except* from the command line.

It would have to be compiled as a separate project, I mean.
 
J

Juan T. Llibre

re:
Okay, NOW I agree. :)

Good ! ;-)

re:
I'm not really following your "App_Code is a security risk" comment.

Anything you place in App_Code is plain source code.

If you run your own server, maybe it's not too much of a security risk,
but if you're running your application at an ISP's server, there's no
telling into how many hands your source code could fall into.

Placing source code in the App_Code is, definitely, a source code security risk.

Instead of placing *source code* in somebody else's server, I'd rather compile
whatever it is I was going to place in the App_Code directory, and place
the assemblies in the /bin directory of my application at the ISP's server.

The risk is much diminished that way.

You still have to deal with the risk of someone using a decompiler on
your assemblies, but a good obfuscator will take care of most of *that* risk.
 
J

JIMCO Software

Juan said:
Placing source code in the App_Code is, definitely, a source code
security risk.
Instead of placing *source code* in somebody else's server, I'd
rather compile whatever it is I was going to place in the App_Code
directory, and place the assemblies in the /bin directory of my
application at the ISP's
server.

Now I disagree. This situation has not changed from 2003. There are just
now more options available to you.

If you are moving your site to a location where you don't want source code
available, you should be precompiling the site. This creates an
app_code.dll for the classes in App_Code and the App_Code folder is not
deployed.

As with most such issues, the developer has a choice. If you choose to
deploy your source code, that's your option. However, in that case, it's
the developer who is the risk, not VS.NET!

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top