Reply
Visual Basic or C#
Old 03-05-2007, 12:53 PM Visual Basic or C#
Super Talker

Posts: 105
Hi all,

I'm struggling with ASP.NET. It's really tough when you're so used to coding ASP.

Right now, I'm trying to determine the benefits of going with either Visual Basic or C#. I know C++ and Visual Basic and prefer... Visual Basic because it's easier to read the code - mainly if you're reading other programmers' code. Also, it's just easier to code and is close to the VBScript I've been using with ASP for seven years.

Is there a benefit to going with one or another?

DonnaZ
DonnaZ is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 03-05-2007, 01:12 PM Re: Visual Basic or C#
Experienced Talker

Posts: 33
To be quite honest, what language you use should be applied to your project.

If it's a time constrained project, use what you know best so you still produce a quality, neat project.

If you're not constrained but you want to pump out a new project, I'd still recommend using what you know because it may have potential.

Learn new languages when you have the time and luxury to do so but remember that you probably won't have neat projects if you just dive in and start coding in that new language.

My two cents: Maximize efficiency, time, and organization with versatility and you'll be happy.

I would learn C# over any other .NET language though and I've definitely learned VB6. Oh and there's always PHP which is seriously close to C++.
Delixe is offline
Reply With Quote
View Public Profile
 
Old 03-05-2007, 01:22 PM Re: Visual Basic or C#
Learning Newbie's Avatar
Moderator

Posts: 4,585
Name: John Alexander
PHP is not a .NET language.

Visual Basic.NET isn't quite as good as C#, but many people won't take advantage of, or even notice, the differences.

Only Visual Basic allows late binding, so even aside from the way the syntax looks, it's closest to ASP Classic.
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 03-08-2007, 10:22 AM Re: Visual Basic or C#
Super Talker

Posts: 105
Thank you both.

Actually, I'm learning both because I may want to build a personal site in one language but there's the marketplace to contend with.

What I'm coming across in the job marketplace is that any programmer or project manager under 30 learned Java in college and they gravitated toward C#. (I'm 47 by the way)

I'm going to throw another fly into the ointment.

Doesn't .NET still use COMs? I remember way back - about 10 years ago - programming them in Visual Basic to use in FoxPro applications.

Does C# allow you to program COMs? This may sound like a really, really dumb question but I remember COMs with C++. In my reading, I haven't come across using C#.

Thanks
DZ
DonnaZ is offline
Reply With Quote
View Public Profile
 
Old 03-09-2007, 02:26 AM Re: Visual Basic or C#
ForrestCroce's Avatar
Half Man, Half Amazing

Latest Blog Post:
Talapus Lake in June Snow
Posts: 3,022
Name: Forrest Croce
Location: Seattle, WA
COM is dieing out, but very slowly. .NET is all "managed code" ( meaning it doesn't allow you to mess up in serious ways ), but at heart Windows is not, and a lot of the software you interact with in .NET is COM or COM+, so .NET has a concept called "interop" that lets managed code interact with unmanaged code. So, the short answer is that .NET doesn't target COM as a platform to code against, but it can work with COM objects if you need to. That's why you haven't run across them, but you may have heard about interop once or twice.

A very cool thing about .NET is that, if you want to, you can write a web site or Windows app in C# and Visual Basic. And other CLR languages if you want. Most of the time it really makes sense to just use one language, but you can do a class library in C# and compile it to a dll, then use that in your VB programming.

I think the main reason people use C# is that they've used C++ in the past, and it's familiar. Although it tends to be slightly faster ( both compile to MSIL, but different code, a lot of implicit conversions from VB ), and in most cases the syntax of C# means less typing. The same number of lines of code, but generally less per line. ( "Dim i As Integer" verses "int i;" )

In Ye Olde IT Market knowing C# makes you more valuable, but I find a lot of software is written in VB because it's easier to find people who know VB.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 05-16-2007, 08:40 AM Re: Visual Basic or C#
Junior Talker

Posts: 3
I work in visual basic. i started working in vb about 10 years ago. when finding a vb installer cd was a challenge for me. Honestly speaking i like programming in asp.net with vb. As i live in the UK, here, all software houses are programming in c#, i am seriously thinking about switching to c# in my next project.


cheers!
financeguru is offline
Reply With Quote
View Public Profile Visit financeguru's homepage!
 
Old 07-09-2007, 02:21 PM Re: Visual Basic or C#
Experienced Talker

Posts: 32
Name: Arnold Smith
Actually, there is no difference in performance between VB.Net & C# except the syntax
arnold is offline
Reply With Quote
View Public Profile Visit arnold's homepage!
 
Old 07-09-2007, 02:59 PM Re: Visual Basic or C#
Learning Newbie's Avatar
Moderator

Posts: 4,585
Name: John Alexander
Depends on what the words in your sentence mean. Normally when someone says "there is no difference in performance" a difference in syntax has nothing to do with the statement - there could be one, there could not. Syntax isn't part of performance.

You bring up another point, if you can write something in VB in half the time of C#, that's important. That's business performance, because it costs less if you pay your developers less.

But if you mean the type of performance that programmers talk about, the amount of computational work done in a set amount of time, C# is absolutely more fast (has better performance) than VB.NET, using the same version and compiler settings for both.
__________________
4 ways to improve the lives of the "bottom billion"

"HEY YOU KIDS GET OFF MY LAWN!" -John McCain
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 07-09-2007, 05:20 PM Re: Visual Basic or C#
boomers's Avatar
Extreme Talker

Posts: 211
Its true that its been proven that C# is faster than VB.NET - from memory of a report I was reading a while do though it really wouldnt be noticable. The only time you would really notice it would be on a huge scale project.

Its really a case of choosing whichever you find easiest to read/type. I find VB alot easier as its something im used to... however if I stare long enough at C# then it starts to make sence.
__________________
NewsToolkit - Add the latest news headlines to your site, automatically kept updated... a FREE service!
boomers is offline
Reply With Quote
View Public Profile
 
Old 08-24-2007, 10:06 PM Re: Visual Basic or C#
Experienced Talker

Posts: 33
I find that I write winforms apps in VB, just because those apps tend to be more simplistic and VB is a little faster for me to write code).

On the other hand, for ASP.NET apps, I use C# exclusively, because I want the extra features.

Learn both. Use as needed. Get the job done.
__________________
FreelanceLocalTech - FREE Directory of Freelance Consultants - Are You In It?
FreelanceMan is offline
Reply With Quote
View Public Profile
 
Old 08-28-2007, 11:09 PM Re: Visual Basic or C#
ForrestCroce's Avatar
Half Man, Half Amazing

Latest Blog Post:
Talapus Lake in June Snow
Posts: 3,022
Name: Forrest Croce
Location: Seattle, WA
Quote:
Originally Posted by financeguru View Post
I work in visual basic. i started working in vb about 10 years ago. when finding a vb installer cd was a challenge for me. Honestly speaking i like programming in asp.net with vb. As i live in the UK, here, all software houses are programming in c#, i am seriously thinking about switching to c# in my next project.
It's a pretty easy switch for most people. You're using all of the same classes with the same methods and properties. The syntax is different, and you approach certain things differently - there's no such thing as a "module" in C# whereas it's a little more work to create and fire your own events and you have to cast everything explicitly or not at all - but otherwise it's almost the same.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 05-21-2008, 02:44 AM Re: Visual Basic or C#
Average Talker

Posts: 26
Personally, i like c# more since...cause you can easily switch to other tech like java
idisplayforless is offline
Reply With Quote
View Public Profile Visit idisplayforless's homepage!
 
Old 05-22-2008, 01:00 PM Re: Visual Basic or C#
Administrator

Posts: 22
Name: LarryB
Quote:
Originally Posted by Learning Newbie View Post
PHP is not a .NET language.

Visual Basic.NET isn't quite as good as C#, but many people won't take advantage of, or even notice, the differences.

Only Visual Basic allows late binding, so even aside from the way the syntax looks, it's closest to ASP Classic.
While PHP is not an official .NET language there is a compiler made so that it can be used in the .NET world. Not that I would recommend it. I prefer C# for a multitude of reason, but mainly because it appears that it is the language that MS is going to to give the most love to going forward.
LarryB is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Visual Basic or C#
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.16614 seconds with 13 queries