Coffeehouse Thread

26 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Learning VB.NET

Back to Forum: Coffeehouse
  • User profile image
    SlackmasterK

    <BackgroundInfo>
    So, as some of you may know, I've been dealing with a (healthcare company of 1000 people in 3 states) for a month or two, getting lined up for a job as a Web Admin / IntraWeb Admin / PC Tech.  Unfortunately, the Web Admin / IntraWeb Admin who would be above me (but thankfully 1500-2000 miles away) is a VB coder; and from what I've heard, a shoddy one at that.  I'm a C# coder.

    I started programming in GWBasic back in the 80's, and moved up through QBasic and Pascal in school, finally settling on C# only recently.  I've also been learning ASP.NET 2.0, and the more of it I learn, the more I love .NET! </BackgroundInfo>

    My question to the more experienced folks here is, how hard is it for someone who knows C#, ASP.NET 2.0, and very old forms of BASIC to learn VB.NET? From what I'm hearing, I'll be hired tomorrow and starting Monday. If it's just different syntax and a few different namespaces I don't see a problem.

  • User profile image
    Ang3lFir3

    From the perspective of a VB.net dev with a little Java background I find that I can easily read C# for the most part (couple little shorthand syntax things that trip me up sometimes)...... So i really don't think it will be any trouble for you at all as soon as you get a handle on the syntax differences....

    Though other than for the sake of the "Web Admin / IntraWeb Admin" you will be working under I don't see a reason why you couldn't continue to write code in C# for the most part....

    Good luck and just remember VB is long winded is all (ok there are more differences than that) Tongue Out

  • User profile image
    Larsenal

    You should have no problems.

  • User profile image
    spoofnozzle

    If you are already C# and .Net fluent...

    http://www.amazon.com/gp/product/0596003196

    pretty much all you need.

  • User profile image
    SlackmasterK

    Outstanding, thanks all.  I expect I'll be kludging through with Intellisense by my side.

  • User profile image
    Tensor

    spoofnozzle wrote:
    If you are already C# and .Net fluent...

    http://www.amazon.com/gp/product/0596003196

    pretty much all you need.


    ++

    good book - also works other way around.

    Also - snippets really come in to there own here. Incredibly useful when o know framework but not the syntax- at least I found so going the other way.

  • User profile image
    Lee_Dale

    I seriously wouldnt worry about it, if you know the framework then more or less every construct in C# has an equivelent in VB.Net  which is only a google search away. Im from a VB background and my last contract was an ASP.Net web project all done in C#, it literally was just a matter of getting used to curly braces and some different keywords although i did know c++ so it wasnt too hard to get used to.

  • User profile image
    Another_​Darren

    VB.NET... Run, run as fast as you can and hide from it.

    7 Years of VB 6 and I finally tried to migrate my skills to VB.NET this year, one and one week later I was buying C# books.  I cannot see the point in learning/using VB.NET if you know C#?  It would be better to get the other VB developer to migrate to C#, he'll (or she?) will thank you later on.

  • User profile image
    Lee_Dale

    Another_Darren wrote:
    VB.NET... Run, run as fast as you can and hide from it.

    7 Years of VB 6 and I finally tried to migrate my skills to VB.NET this year, one and one week later I was buying C# books.  I cannot see the point in learning/using VB.NET if you know C#?  It would be better to get the other VB developer to migrate to C#, he'll (or she?) will thank you later on.


    sorry but thats rubbish theres no reason to use C# over VB.Net it all acheives the same thing at the end. Id suggest learing both theres no great learning curve to learn either if you already know one and it will be worth it if you intened to work on many different .net projects.

  • User profile image
    Another_​Darren

    For starters VB.NET usually needs more lines of code to achieve the same result that C#.  And VB.NET is not as nice at handling certain logic operators or statements without additional checks in you code.

    From my experience with VB 6 allowed lazy programming and that's why it was popular.  Moving VB to .NET microsoft tried to neaten the language up but all the VB developers moaned about "but in VB 6 we just had to....." so they put all the shortcuts (usually meaning more processing) and lazy options back into VB.  I am a VB programmer and I hate the language when compared to C#,  found the learning curve of VB 6 to VB.NET to be worse than VB 6 to C#. 

  • User profile image
    Tensor

    Another_Darren wrote:
    For starters VB.NET usually needs more lines of code to achieve the same result that C#.  And VB.NET is not as nice at handling certain logic operators or statements without additional checks in you code.




    Right, so c# biggots criticise VB for introducing the My namespace on the grounds that its dumbing-down, and then criticise because it takes more lines of code to achieve something?

    One, you cant have it both ways. Two, thats rubbish as in both you are basicly writing code to target framework classes which takes the same number of lines.

    And exactly which logic operators or statements are not as nice? What additional checks do you need exactly? I think all the things you are attributing to the language are in fact due to lazy code.

  • User profile image
    Sven Groot

    Tensor wrote:
    And exactly which logic operators or statements are not as nice?

    I think he's talking about the AndAlso and OrElse mess, and if so it's the only point from his post I agree with.

  • User profile image
    phreaks

    The main difficulties you are likely to encounter are minor.

    Things like inadvertantly using curly braces, forgetting to use the Dim as Object style vs the Object myObject style, and using the Implements and Inherits keywords vs the semi-colon.

    Delagates in VB are weird, so you may want to research that.

    But that is about it, at least for me anyway.


    Good Luck!

  • User profile image
    Lee_Dale

    Sven Groot wrote:
    Tensor wrote:
    And exactly which logic operators or statements are not as nice?

    I think he's talking about the AndAlso and OrElse mess, and if so it's the only point from his post I agree with.


    yes i agree personally im not a fan of them operators but remember VB was created to be more like psuedo code so people who didnt have a degree in maths could pick it up to customise there applications. However VB has evolved and can do everything C# can and being a little more easier to read and a bit more verbose doesnt mean its an inferior language its just as powerful.

    Saying that I still prefer C# Wink

  • User profile image
    AndyC

    leeappdalecom wrote:
    
    sorry but thats rubbish theres no reason to use C# over VB.Net it all acheives the same thing at the end.


    Not entirely true. If you need unsafe code, then you have to use C#. Likewise if your doing late-bound COM work, VB rules.

    Right tool for the right job and all that. For the majority of stuff though, it's about personal preference (or in house coding guidelines!)

  • User profile image
    Lee_Dale

    AndyC wrote:
    leeappdalecom wrote:

    sorry but thats rubbish theres no reason to use C# over VB.Net it all acheives the same thing at the end.


    Not entirely true. If you need unsafe code, then you have to use C#. Likewise if your doing late-bound COM work, VB rules.



    Yes true but i was trying not to get picky about it Tongue Out

  • User profile image
    littleguru

    it's easy. Use an automated tool to convert your C# to VB.NET. hehe

  • User profile image
    SlackmasterK

    Another_Darren wrote:
    VB.NET... Run, run as fast as you can and hide from it.

    7 Years of VB 6 and I finally tried to migrate my skills to VB.NET this year, one and one week later I was buying C# books.  I cannot see the point in learning/using VB.NET if you know C#?  It would be better to get the other VB developer to migrate to C#, he'll (or she?) will thank you later on.

    Because apparently, the lady who's going to be my boss has to see all my work before it can be published; and she has to know what it's doing.  The thing that confuses me is that I can look at VB code and know what it's doing; why can't she do that with C#?

    She's apparently been working in VB since VB4, and according to my 'insider contact', she's never been very good at it.  I can only imagine the pain of trying to teach her a new language, much less trying to get her to learn it on her own.

    [quote user"Tensor"]Right, so c# biggots criticise VB for introducing the My namespace on the grounds that its dumbing-down, and then criticise because it takes more lines of code to achieve something? [/quote]
    Isn't VB's 'my' namespace similar to C#'s 'this'?


    Here's a question, I was messing with VB.NET last night, and I've been trying to figure out FOR loops.  In C# it's as easy as:

    for (int index = 0; index < 10; index++) {
     [...] }

    But in VB I have to:

    Dim b As Integer = 0
    For b = 0 To 10 
     [...]
     Next

    Seems to me there should be an easier way, especially since I won't need 'b' anymore after the loop.  I tried for (dim b as Integer) = 1 to 10, that didn't work; I tried for dim b as Integer = 1 to 10, that didn't work; I tried the classic BASIC method of for b = 1 to 10, that didn't work without declaring and initializing 'b' ahead of time. 

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.