Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing C# & VB.NET ...

Status
Not open for further replies.

VBakias

MIS
May 24, 2005
219
0
0
GR
Apart from the different syntax why should i use C# ?
 
As far as I can tell - to all intents and purposes its a matter of personal choice.

However if you are doing a lot of Office automation, VB is a better choice because Office products provide many optional parameters in their functions which VB supports and C# doesn't (although there are ways round this).
 
As further comment: From the reading I've done and a couple of MS seminars I've attended, MS seems to be pushing C# as their language of the future. This doesn't mean that VB will be going away any time soon, it's just a trend I've noticed.

For my own part, being a former C guy, I prefer the syntax of C#. Another thing to think about is that C# is very similar to Java. If you ever need to do something cross-platform you will have an easier time going back and forth between C# and Java than VB and Java.

[sub]Jeff
[purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day

I was not born cynical - I earned my cynicism through careful observation of the world around me.[/sub]
 
So, arr eee sayin', Jeff laad, that VB.NET is bein' a girl's language?

(Sorry, just seen your sig line...) [smile]
 
C# (windows apps / web apps) has better performance than VB?
 
The final code is compiled to an intermediate language and then that is JIT'd (Just in time compiling). There should be no difference in performance.

 
Arghhhh matey. The syntax is just seemin' a bit wordy and forced in some areas. Nothin' being wrong with it bein' used by manly men. [pirate]

[sub]Jeff
[purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day

I was not born cynical - I earned my cynicism through careful observation of the world around me.[/sub]
 
ERrrr... why VB is called "toy" programming language? What's the difference from C(#); apart from the syntax ???

If I have a project in my mind...I can program with VB (toy). As far as I know the syntax, can't i develop the same project with C# also?
 
Wether you use VB.Net, C#, or any of the weird ones (J#, Delphi.Net, etc) it doesn't matter. It all gets compiled to the CLR. The primary difference is Syntax. There are a few basic rules that differ between the two, but nothing that will make a huge (or even barely noticable) difference.

No, the future is in C Plush Plush[puppy], the kinder, softer C. (J/K!)

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Yes you can develope any project in C# or VB, and you should be successful in both.

Here are some differences other then just syntax.

There is this pre compiling thing and auto-formatting that bugs me to death, In Vb you know immediately if your code will compile

VB Automatically adds a namespace even if you remove it from the project properties.

If you have > 45 projects in a solution really weird things can start happening. Like the IDE hanging when opening, especially with web projects.

There is the Microsoft.VisualBasic import that is automatically added to any project. This namespace makes VB toy like because you get all sort of fun functions that behind the scene are really c# code. Like IsNothing, IsStr, IsNumeric, cStr

VB is much more wordy.
Public tempStr as String
vs
string tempStr;

VB Hides fundamental ideas like delegates.

VB Has Module (AKA a class with all static members in C#)


 
Ther reputation of VB is loeft over from earlier versions. VB.NET is fully object oriented and not a toy. Earlier versions of VB did not have all the capabilites of an OO language and wre not considered as powerful.

Whatever project you're looking at, you should be able to use either VB.NET or C# (or both, if you need multiple projects in the solution - the ability to mix languages is a selling point of .NET)

[sub]Jeff
[purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day

I was not born cynical - I earned my cynicism through careful observation of the world around me.[/sub]
 
I know there are delegates, but you don't need to declare one to have a events. You do in c#
 
I have read about salary differences, but every article I can find seems to be at least a few years old. Anyone have anything new?

I just like the straight forward language itself. It is like reading a sentence (if the programmer is good anyway), makes it much easier to work on code someone else has written. I don't know C#, so I can't really speak about that (but I am interested).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top