Wrox Programmer Forums
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2004, 08:46 AM
Authorized User
 
Join Date: Jul 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# v/s VB.NET


 Hi Friends,

 I have to appear for an .Net Interview where they are looking out for a combination of C#, ASP.NET and SQL 2000. I have mainly worked on VB.NET instead of C#, can someoone please tell me what are the major differences between C# and VB.NET and what are the basic minimum things one has to watch out for in C# who has mainly worked on VB.NET. And if I wanna learn C# in a day what is it that I need to learn if I am already aware about VB.NET.

Augustine.

 
Old December 15th, 2004, 06:43 PM
Authorized User
 
Join Date: Jan 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rathbird
Default

I went to a project with a VB background and they were working in C#. If you have solid programming experience, you will have no problems. I spent the first week of work on google typing in the VB functions I knew followed by "C# equivalent". If you've worked in Javascript before, you're halfway to learning the syntax. Remember your semicolons! Syntactically, for loops, case statements, overloading, etc. looks different, but it doesn't take long to figure it out. I've come to like c# better, I think it looks cleaner and is easier to read with the nesting of the braces {} instead of begin - end. When you run into a wall, post your question on the board, someone is always ready to help. Good luck!

 
Old December 15th, 2004, 11:58 PM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Download a copy of a VB to C# converter, such as Instant C# (www.instantcsharp.com). I found this very useful to help me think in C# terms.



 
Old December 16th, 2004, 02:19 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Augustine,

1. http://www.4guysfromrolla.com/webtech/012702-1.shtml
2. http://searchvb.techtarget.com/webca...510765,00.html
3.http://dotnet247.com/247reference/msgs/35/175072.aspx

I also suggest you to have a look at articles talking about the new feature sets added in C#/VB.NET for its next release.

All the best!

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old December 16th, 2004, 05:29 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Augustine,
There is not much difference between VB.NET and C# because both of them compile to Microsoft Intermediate Language,so in performance there is no much difference,but as a developer(or student) it's better to know both of them but select and continue one of them more professionally,usually C# is more readable and represents OOP concepts better,
if you know VB.NET and want to quickly learn C# Check out below link,
http://support.microsoft.com/?kbid=308470
Cheers.

_____________________________
Mehdi.
software engineering student.
Looking for a good job for summer 2005.
 
Old December 16th, 2004, 02:21 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:Originally posted by augustine
 can someoone please tell me what are the major differences between C# and VB.NET ...
Check out this,
Cheers.

_____________________________
Mehdi.
software engineering student.
Looking for a good job for summer 2005.
 
Old December 17th, 2004, 02:25 AM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://smartypeeps.blogspot.com/2004...and-vbnet.html

Try the above page also.


It is not how much we do,
but how much love we put in the doing.

-Mother Theresa
 
Old December 19th, 2004, 11:10 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by mehdi62b
 ...usually C# is more readable and represents OOP concepts better

Mehdi,

How does C# represent OOP concepts better? Given that the languages are all based on the same common language framework, the syntaxes are virtually identical. Regarding readability, in many cases I find VB.net to be much more readable than C#. After a long block of code I find this:

            End Switch
        Next
    End If
End If

much easier to read than this:

            }
        }
    }
}

I'm curious to hear your opinions of how OOP concepts are represented better in C#.
 
Old December 20th, 2004, 11:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
quote:Originally posted by planoie
 Regarding readability, in many cases I find VB.net to be much more readable than C#.
Oh how I love your example. I can't tell you how many times I get lost in the c# code, especially if the blocks are big. the VB.NET way of doing it is so much more readable.

There are so many things I see as "backward" in c#- like the dimensioning of variables and in the definitions of clases.. ugh. I use c# more than vb.net-- but I like vb.net so much better.

Hal Levy
I am here to help you, not do it for you.
 
Old December 20th, 2004, 11:51 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Peter,
I think for example these two reasons could result better OOP designing,
1-Operator overloading -(coming to VB.NET in Whidbey).
2-Explicit interface implementation.
especially second one could clarify my meaning you know Explicit interface implementation in C# results better separation from the concept of class and interface ...
Regarding readability,I think both of C# and VB.NET are the same,if you try to see all codes not just emphasize on some parts,take a look at below code,
Code:
'VB.NET Syntax
If A = 5 Then
  DoSomething()
  DoSomethingAgain()
End If
//C# Syntax
If (a == 5)
{
   DoSomething();
   DoSomethingAgain();
}
I think above code in C# is more readable because in C# we separate every statement with ; while in VB.NET there is nothing(or in C# a==5 while in VB a=5) but regarding writability,I think C# is more understandable and better,I mean for a beginner it's easier to write with C# rather than VB.NET,for example
Code:
'VB.NET Syntax
Dim x As Y = New Y("ABC")
//C# Syntax
Y x = new Y("ABC");
after all this talk,consider that my migration to C# was from C++.

_____________________________
Mehdi.
software engineering student.
Looking for a good job for summer 2005.





Similar Threads
Thread Thread Starter Forum Replies Last Post
vb.net 2008 re: VB.NET databases book bigbearjeff VB.NET 0 June 2nd, 2008 01:22 PM
convert dsr file from vb to vb.net Shashi001 VB Components 1 September 22nd, 2006 12:24 PM
VB.Net question on Windows VB.Net datagrids dmsousa VS.NET 2002/2003 1 January 19th, 2005 02:45 PM
vb.net 2002 OR vb.net 2003 metalaaron VB.NET 2002/2003 Basics 0 August 5th, 2003 10:00 AM
vb.net 2002 - vb.net 2003 book metalaaron Wrox Book Feedback 0 August 2nd, 2003 10:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.