Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Desktop Developer

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    « The Like keyword in VB.Net and the equivalent in C#Some more string concatenation weirdness this time with Enums in VB.Net and a difference with C# »
    comments

    I've liked and used VB.Net since 2003 and I used C# since about 2005. Me and VB.Net have had a love-hate relationship since the beginning.

    I love it's verbosity and expressiveness I just love the syntax. And it just does everything I need it to do for the applications I have to write. I don't see a reason to leave it behind for something new and different.

    I hate how they sometimes screw up the syntax, yes lambdas look ugly. The whole version 9 debacle where they implemented lambdas in a half-assed way.

    And then there has been all the debates about "is VB.Net just as good as C#". And no it isn't. It's different.

    You can not assume that the 2 will compile to the same IL and thus you can not assume that they will compile to the same machine-code. You can not assume that what you wrote in C# will be usable by a VB.Net assembly. And you can't assume that the opposite will happen.

    There are to many little difference that will bite you if you assume they are the same and that they are compatible.

    Oh sure, they are 95% the same, but it's the 5% that matters in the real world that will hurt you. It's that 5% that will make you cry like a baby, because you will have to write hacks to fix it. And you will have to write a unit test in each language just to be sure your assumptions are correct.

    It is sad to see that most people will say that it is ok to pick VB.Net over C# because they are just the same and they use the same framework, and it's even true. But they are only telling you half of the story.

    It' s like saying a Lamborghini and a Ferrari are both cars so if your mechanic knows how the fix one he will know how to fix the other. Which of course is true 95% of the time. but no 100% of the time. Because they are different.

    There is no shame in being different. There is no shame in choosing one over the other. But you have to know that if you do choose that there is a difference.

    So it frustrates me to no end that people answer VB.Net questions by VB.Net users with a "this is how it works in C# and it should be the same in VB.Net". Those are not helping anyone and they show a lack of respect. Because the difference is there.

    I have blogged about the many difference here in the past. and some of them are really stupid.

    So I wish people would stop answering VB.Net questions just because they know C#. You might just be giving the wrong advice.

    About the Author

    User bio imageChris is awesome.
    Social SitingsTwitterHomePageLTD RSS Feed
    c#, vb.net
    InstapaperVote on HN

    14 comments

    Comment from: SQLDenis [Member] Email
    SQLDenis I have seen this before also.....


    This is how it works in access/Oracle/MySQL/PostgreSQL/SqlLite, it should be the same in SQL Server
    08/07/11 @ 06:13
    Comment from: SQLDenis [Member] Email
    SQLDenis Do they still call it VB.NET? I thought it is just VB since 2005?
    08/07/11 @ 06:14
    Comment from: SQLDenis [Member] Email
    SQLDenis I did my fair share of VB 4 (16 and 32 bit), VB 5 and VB 6

    But when .NET came out, I thought it was easier to do c# since so many things changes and back in the day most samples were also just for c#, VB samples were hard to find
    08/07/11 @ 06:19
    Comment from: Christiaan Baes (chrissie1) [Member]
    Christiaan Baes (chrissie1) Even MS calls it VB.Net so I guess that's it's name.
    08/07/11 @ 06:31
    Comment from: SQLDenis [Member] Email
    SQLDenis I think I know what it is now, they used to tack the year on...like VB.NET 2002
    08/07/11 @ 06:58
    Comment from: Jack McGuire [Visitor]
    Jack McGuire Here! Here!!!
    08/09/11 @ 08:26
    Comment from: Anonymous [Visitor]
    Anonymous I, for one, appreciate an answer to a question even if it is not in the language or database that the original question was posed in.

    Obviously it is not exactly what the person needed, but in many cases it IS a starting point, and may either show something the person hadn't though of, or get them started in the right direction. It is most often better than no answer, and if not, the person is always free to ignore the advice. I certainly don't see it as a matter of respect.

    08/09/11 @ 08:32
    Comment from: ANmar [Visitor] Email · http://www.ANmars.com
    ANmar I strongly agree, I personally had an experiment with this, I thought they are the same so wen ahead and joined a class.
    The price for me to know that was that 8 hours of me trying to "translate" the C# into VB.NET and understand the class, then the $400 that I paid for it.
    08/09/11 @ 10:13
    Comment from: Interarticle [Visitor]
    Interarticle As a person who has a similar learning path as yours (though offset that by 3 years), I think otherwise. It's always better to know something that's almost the same against getting nothing. VB'ers can always try to compile to code and reflector it (but then reflector is not free any more ...). Besides, the .Net Framework is completely compatible with both languages.
    The 5% you are talking about mostly reside on the interfacing layer, like optional parameters and parametric properties in VB and unsafe stuff in C# (yes, it's interfacing with other native C programs). It's usually nothing crucial.
    The problem is, there are more people willing to answer C# questions than VB ones. Unless the trend turns around, VB learners will continue to face the discrimination.
    08/09/11 @ 10:43
    Comment from: CoreAn_Crack3rZ [Visitor] · http://androidfanatics.blogspot.com/
    CoreAn_Crack3rZ I agree with that "VB.Net isn't C#". True, that they don't produce the same output (IL), but what matters most is it both produces the same solution to a specific problem. It's up to the programmer whichever language they choose.

    I personally prefer C# more. :D
    08/09/11 @ 10:54
    Comment from: German Valencia [Visitor] · http://tecmo.com.co
    German Valencia The problem is. If you know C# andVB, an answer in any of them is usefull, but if your knowledge in C# is poor (Usually who knows C# also knows VB but not viceversa)the answer will give you a headache.
    08/09/11 @ 11:26
    Comment from: Oscar [Visitor] Email
    Oscar I'm glad someone finally wrote about it. If it's a VB question, responders should stick to answering it in VB. I know how I would do things in C#, but we never even tinker with VB so, I'm looking for the quick fix when I'm asking questions about VB.
    08/09/11 @ 13:26
    Comment from: Robert Barnes [Visitor] · http://www.robertb.co.nz
    Robert Barnes Is there any reason to choose either VB.Net or C# other than one's personal preference and whether you prefer the aesthetics of one language or the other? Are there any problems which are much easier to solve in one language than the other?

    The differences that Christaan documents are extremely low level.
    08/09/11 @ 15:12
    Comment from: Stewart [Visitor] · http://www.facebook.com
    Stewart I personally agree with the fact that they give the same answer to a problem. This is because I took the Microsoft 70-511 exam and its not language specific. You can use either VB or C#. This shows that when solving a problem its irrelevant whether you use one of the two.
    08/10/11 @ 01:41

    Leave a comment


    Your email address will not be revealed on this site.

    To mislead the spambots.

    Your URL will be displayed.
    (Line breaks become <br />)
    (Name, email & website)
    (Allow users to contact you through a message form (your email will not be revealed.)