vb.net or C#?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan

    vb.net or C#?

    Hi,

    i develop webapplications with asp.net and vb.net. Is there any good reason
    why i should switch to (and learning) C#?

    Thanks for the pro's and contra's.
    Dan


  • John Timney \(MVP\)

    #2
    Re: vb.net or C#?

    The main reason is that you'll be able to do jobs in both c# and vb.net.
    Your understanding of the framework will already stand you in a good stead
    to learn it.

    This is old, but useful all the same.


    Regards

    John Timney (MVP)





    "Dan" <nm@zszsz.xvwro te in message
    news:O0inPZKAJH A.3964@TK2MSFTN GP06.phx.gbl...
    Hi,
    >
    i develop webapplications with asp.net and vb.net. Is there any good
    reason why i should switch to (and learning) C#?
    >
    Thanks for the pro's and contra's.
    Dan
    >

    Comment

    • Mark Rae [MVP]

      #3
      Re: vb.net or C#?

      "Dan" <nm@zszsz.xvwro te in message
      news:O0inPZKAJH A.3964@TK2MSFTN GP06.phx.gbl...
      I develop webapplications with ASP.NET and VB.NET. Is there any good
      reason why I should switch to (and learn) C#?
      Technically speaking, no. C# supports unsafe code aka pointers, but that's
      about the only difference...

      Commercially speaking, learning C# will (in theory anyway) make you twice as
      marketable...

      Since you work with ASP.NET, you will almost certainly have plenty of
      experience with JavaScript, so you will not find the C# syntax too difficult
      to grasp..


      --
      Mark Rae
      ASP.NET MVP


      Comment

      • Dan

        #4
        Re: vb.net or C#?

        Thanks, i start right now with C# ...

        "Mark Rae [MVP]" <mark@markNOSPA Mrae.netschreef in bericht
        news:OleTv$KAJH A.5048@TK2MSFTN GP05.phx.gbl...
        "Dan" <nm@zszsz.xvwro te in message
        news:O0inPZKAJH A.3964@TK2MSFTN GP06.phx.gbl...
        >
        >I develop webapplications with ASP.NET and VB.NET. Is there any good
        >reason why I should switch to (and learn) C#?
        >
        Technically speaking, no. C# supports unsafe code aka pointers, but that's
        about the only difference...
        >
        Commercially speaking, learning C# will (in theory anyway) make you twice
        as marketable...
        >
        Since you work with ASP.NET, you will almost certainly have plenty of
        experience with JavaScript, so you will not find the C# syntax too
        difficult to grasp..
        >
        >
        --
        Mark Rae
        ASP.NET MVP
        http://www.markrae.net

        Comment

        • Stan

          #5
          Re: vb.net or C#?

          On 17 Aug, 21:17, "Dan" <n...@zszsz.xvw rote:
          Hi,
          >
          i develop webapplications with asp.net and vb.net. Is there any good reason
          why i should switch to (and learning) C#?
          >
          Thanks for the pro's and contra's.
          Dan
          Hi Dan

          I started working in VB.NET for web apps but have since changed over
          to C#

          I prefer it but have never been able to pin down the reason(s). It
          might be the use of symbols such as { } for statement blocks rather
          than key words like if, end if etc Without the code assistant this
          would make a lot of difference, but as it is the VS code editor saves
          a lot of typing.

          One thing you may find strange at first are the different rules for
          assignment compatibility. VB allows strings and numbers to be used
          almost interchangeably but C# is more fussy and requires explicit
          conversion. Use the Parse() function for strings to numbers and dates.
          Also remember that Session[] and DataRow/DataRowView indexes return
          objects that require type casting in C#
          You will also find that list elements have values that are strings and
          unlike VB will cannot be aigned to number variables without
          conversion.

          Good luck

          Comment

          • Jonathan Wood

            #6
            Re: vb.net or C#?

            For the most part, they are exactly the same language but with slightly
            different syntax. With few exceptions, it comes down to your taste in syntax
            and what language potential employers are deciding to use.

            --
            Jonathan Wood
            SoftCircuits Programming



            "Dan" <nm@zszsz.xvwro te in message
            news:O0inPZKAJH A.3964@TK2MSFTN GP06.phx.gbl...
            Hi,
            >
            i develop webapplications with asp.net and vb.net. Is there any good
            reason why i should switch to (and learning) C#?
            >
            Thanks for the pro's and contra's.
            Dan
            >

            Comment

            • sloan

              #7
              Re: vb.net or C#?

              If

              Option Strict On
              Option Explicit On

              is set in vb.net files (or there are project level settings)

              Then vb.net works almost like c#.

              But there is no way to "turn it off" in C#, which I prefer.



              "Stan" <googlestan@phi lhall.netwrote in message
              news:84aaed54-3245-45ff-8027-af137c9d7da2@d1 g2000hsg.google groups.com...
              On 17 Aug, 21:17, "Dan" <n...@zszsz.xvw rote:
              >Hi,
              >>
              >i develop webapplications with asp.net and vb.net. Is there any good
              >reason
              >why i should switch to (and learning) C#?
              >>
              >Thanks for the pro's and contra's.
              >Dan
              >
              Hi Dan
              >
              I started working in VB.NET for web apps but have since changed over
              to C#
              >
              I prefer it but have never been able to pin down the reason(s). It
              might be the use of symbols such as { } for statement blocks rather
              than key words like if, end if etc Without the code assistant this
              would make a lot of difference, but as it is the VS code editor saves
              a lot of typing.
              >
              One thing you may find strange at first are the different rules for
              assignment compatibility. VB allows strings and numbers to be used
              almost interchangeably but C# is more fussy and requires explicit
              conversion. Use the Parse() function for strings to numbers and dates.
              Also remember that Session[] and DataRow/DataRowView indexes return
              objects that require type casting in C#
              You will also find that list elements have values that are strings and
              unlike VB will cannot be aigned to number variables without
              conversion.
              >
              Good luck

              Comment

              • Cowboy \(Gregory A. Beamer\)

                #8
                Re: vb.net or C#?

                If you started with VB.NET, probably not. If you started with VB and moved
                to VB.NET, you are probably using a lot of training wheels. The easiest way
                to tell is whether or not you are using the Microsoft.Visua lBasic
                namespaces, esp. .Compatibility. In this case, learning C# makes you more
                likely to learn the Framework and get rid of the training wheels.

                As far as other reasons. I find there are more C# jobs than VB.NET. If this
                is not true in your area, then you need not worry, other than the suggestion
                above.

                --
                Gregory A. Beamer
                MVP, MCP: +I, SE, SD, DBA

                Subscribe to my blog


                or just read it:


                *************** *************** **************
                | Think outside the box! |
                *************** *************** **************
                "Dan" <nm@zszsz.xvwro te in message
                news:O0inPZKAJH A.3964@TK2MSFTN GP06.phx.gbl...
                Hi,
                >
                i develop webapplications with asp.net and vb.net. Is there any good
                reason why i should switch to (and learning) C#?
                >
                Thanks for the pro's and contra's.
                Dan
                >

                Comment

                • Cowboy \(Gregory A. Beamer\)

                  #9
                  Re: vb.net or C#?

                  I would disagree that they are "exactly the same language but with slightly
                  different syntax". Language wise, there are loads of difference. But, if you
                  are using the Framework properly, they are fairly identical. One uses [],
                  the other () and you have to add semi-colons. :-)

                  --
                  Gregory A. Beamer
                  MVP, MCP: +I, SE, SD, DBA

                  Subscribe to my blog


                  or just read it:


                  *************** *************** **************
                  | Think outside the box! |
                  *************** *************** **************
                  "Jonathan Wood" <jwood@softcirc uits.comwrote in message
                  news:OE2aZvLAJH A.4148@TK2MSFTN GP05.phx.gbl...
                  For the most part, they are exactly the same language but with slightly
                  different syntax. With few exceptions, it comes down to your taste in
                  syntax and what language potential employers are deciding to use.
                  >
                  --
                  Jonathan Wood
                  SoftCircuits Programming

                  >
                  >
                  "Dan" <nm@zszsz.xvwro te in message
                  news:O0inPZKAJH A.3964@TK2MSFTN GP06.phx.gbl...
                  >Hi,
                  >>
                  >i develop webapplications with asp.net and vb.net. Is there any good
                  >reason why i should switch to (and learning) C#?
                  >>
                  >Thanks for the pro's and contra's.
                  >Dan
                  >>
                  >

                  Comment

                  • Scott M.

                    #10
                    Re: vb.net or C#?

                    One thing you may find strange at first are the different rules for
                    assignment compatibility. VB allows strings and numbers to be used
                    almost interchangeably but C# is more fussy and requires explicit
                    conversion.
                    The first thing a VB .NET developer should do is turn on Option Strict for
                    all their projects. Once that is done, VB .NET is a type-safe language,
                    just as C# is and the situation you described above will not be allowed.

                    -Scott


                    Comment

                    • Mark Rae [MVP]

                      #11
                      Re: vb.net or C#?

                      "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld @comcast.netNoS pamMwrote in
                      message news:uh4S9zLAJH A.4368@TK2MSFTN GP06.phx.gbl...

                      [top-posting corrected]
                      >>I develop webapplications with ASP.NET and VB.NET. Is there any good
                      >>reason why I should switch to (and learn) C#?
                      >>
                      >For the most part, they are exactly the same language but with slightly
                      >different syntax.
                      >
                      I would disagree that they are "exactly the same language but with
                      slightly different syntax".
                      So would I.


                      --
                      Mark Rae
                      ASP.NET MVP


                      Comment

                      • Jonathan Wood

                        #12
                        Re: vb.net or C#?

                        Cowboy,
                        >I would disagree that they are "exactly the same language but with slightly
                        >different syntax". Language wise, there are loads of difference. But, if
                        >you are using the Framework properly, they are fairly identical. One uses
                        >[], the other () and you have to add semi-colons. :-)
                        Heh, well I did say "for the most part." But, really, I find when I'm
                        reading books that show code samples in both VB.NET and C#, I find almost no
                        reason to look at the sample that uses the code I happen to be using.
                        Primarily for the reason you suggested: most of the language consists of
                        framework calls. Just a different syntax.

                        --
                        Jonathan Wood
                        SoftCircuits Programming

                        >
                        --
                        Gregory A. Beamer
                        MVP, MCP: +I, SE, SD, DBA
                        >
                        Subscribe to my blog

                        >
                        or just read it:

                        >
                        *************** *************** **************
                        | Think outside the box! |
                        *************** *************** **************
                        "Jonathan Wood" <jwood@softcirc uits.comwrote in message
                        news:OE2aZvLAJH A.4148@TK2MSFTN GP05.phx.gbl...
                        >For the most part, they are exactly the same language but with slightly
                        >different syntax. With few exceptions, it comes down to your taste in
                        >syntax and what language potential employers are deciding to use.
                        >>
                        >--
                        >Jonathan Wood
                        >SoftCircuits Programming
                        >http://www.softcircuits.com
                        >>
                        >>
                        >"Dan" <nm@zszsz.xvwro te in message
                        >news:O0inPZKAJ HA.3964@TK2MSFT NGP06.phx.gbl.. .
                        >>Hi,
                        >>>
                        >>i develop webapplications with asp.net and vb.net. Is there any good
                        >>reason why i should switch to (and learning) C#?
                        >>>
                        >>Thanks for the pro's and contra's.
                        >>Dan
                        >>>
                        >>
                        >

                        Comment

                        • Riki

                          #13
                          Re: vb.net or C#?

                          Dan wrote:
                          Hi,
                          >
                          i develop webapplications with asp.net and vb.net. Is there any good
                          reason why i should switch to (and learning) C#?
                          >
                          Thanks for the pro's and contra's.
                          Dan
                          In addition to what is already said, I like the "My" namespace a lot in
                          VB.NET.
                          It is missing in C#.

                          --

                          Riki


                          Comment

                          • =?ISO-8859-1?Q?G=F6ran_Andersson?=

                            #14
                            Re: vb.net or C#?

                            Dan wrote:
                            Hi,
                            >
                            i develop webapplications with asp.net and vb.net. Is there any good reason
                            why i should switch to (and learning) C#?
                            >
                            Thanks for the pro's and contra's.
                            Dan
                            >
                            >
                            Regardless if you switch language or not, you will get a better
                            understanding of programming in general by learning C# too.

                            C# and VB.NET compile into pretty much the same IL code, so learning how
                            C# works will also make you understand better what your VB.NET code does.

                            --
                            Göran Andersson
                            _____
                            Göran Anderssons privata hemsida.

                            Comment

                            • Marc

                              #15
                              Re: vb.net or C#?


                              "Dan" <nm@zszsz.xvwro te
                              i develop webapplications with asp.net and vb.net. Is there any good
                              reason why i should switch to (and learning) C#?
                              No. But let me give you my opinion.

                              For making applications, it should not matter that much, it's not that one
                              is that much better then the other.

                              For job opportunities, I think you should do some C#.

                              Then another thing is, how much trouble would you have writing in another
                              language? The past two years I've used C++, Delphi, Java, VB.NET, C#,
                              ASP.NET, JSP and Javascript in different projects. If I work in one language
                              for two weeks I am used to it. Even though I have more experience in C++ for
                              example, now I am programming in Delphi, and if I now have to write C++ code
                              I put 'then' afther my if statements. Just like on holiday, after speaking
                              Spanish for two weeks, I forget my German en English, while I am Dutch.

                              Hence the writing EndIf instead of }, that's not really the main problem in
                              writing ASP.NET programs, that what I think. One could change from VB to C#
                              in less then a month. Learning the framework possibilities would cost you a
                              year at least.


                              Comment

                              Working...