When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article

The 4 Guys Present: ASPFAQs.com

Jump to a FAQ
Enter FAQ #:
..or see our 10 Most Viewed FAQs.

4GuysFromRolla.com : ASP FAQS : ASP.NET


What are the differences between C# and VB.NET, and which language should I use to create my ASP.NET Web pages?

[Print this FAQ]

Answer: With ASP.NET, developers can choose to create the server-side code for their Web pages in a myriad of languages. The most common languages that developers will choose, will likely be VB.NET or C#. (There are a number of other languages one can choose to use, from Perl.NET to JScript.NET to COBOL.NET.) Of the many ASP.NET articles and code examples that exist on the Web, it seems that while a slim majority of them are shown VB.NET, a good number are written in C#.

What language is the "best" language choice? If you are a VB wizard, should you take the time to learn C# or continue to use VB.NET? Are C# ASP.NET pages "faster" than VB.NET ASP.NET pages? These are questions that you may find yourself asking, especially when you're just starting to delve into .NET. Fortunately the answer is simple: there is no "best" language. All .NET languages use, at their root, functionality from the set of classes provided by the .NET Framework. Therefore, everything you can do in VB.NET you can do in C#, and vice-a-versa. The only differences among languages is merely a syntactical one.

If you are more familiar with Java, JScript, or C/C++, you may find C#'s syntax more familiar than VB.NET's. If you've been doing VB for the past five years, there's no reason to think you have to now switch to a new langauge (although you should always look to be learning new things).

What if you have an ASP.NET Web page written in C# that you want to convert to VB.NET, or vice-a-versa? As aforementioned, the languages only differ in their syntax, so this translation, while not usually trivial, is still fairly striaghtforward, and can be accomplished systemmatically. For information on the syntactical differences between the two languages, be sure to read: From VB.NET to C# and Back Again.

Happy Programming, with whatever language you choose!

FAQ posted by Scott Mitchell at 2/8/2002 12:43:03 PM to the ASP.NET category. This FAQ has been viewed 64,405 times.

Do you have a FAQ you'd like to suggest? Suggestions? Comments? If so, send it in! Also, if you'd like to be a FAQ Admin (creating/editing FAQs), let me know! If you are looking for other FAQs, be sure to check out the 4Guys FAQ and Commonly Asked Messageboard Questions!

Most Viewed FAQs:

1.) How can I format numbers and date/times using ASP.NET? For example, I want to format a number as a currency. (761643 views)
2.) I am using Access and getting a 80004005 error (or a [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)' error) when trying to open a connection! How can I fix this problem? (207777 views)
3.) How can I convert a Recordset into an array? Also, how can I convert an array into a Recordset? (202549 views)
4.) How can I quickly sort a VBScript array? (196039 views)
5.) How can I find out if a record already exists in a database? If it doesn't, I want to add it. (156019 views)
6.) How do I display data on a web page using arrays instead of Do...While...MoveNext...???... (152331 views)
7.) When I get a list of all files in a directory via the FileSystemObject, they aren't ordered in any reasonable way. How can I sort the files by name? Or by size? Or by date created? Or... (140381 views)
8.) For session variables to work, must the Web visitor have cookies enabled? (110162 views)
9.) Can I send emails without using CDONTS? (107083 views)
10.) How can I take the result of a SELECT...MULTIPLE or a group of same-named checkboxes and turn it into a query? That is, if the user selects 3 answers, how can I construct a query that looks for all 3? (106308 views)
Last computed at 9/17/2007 3:22:00 AM

ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article