• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

.Net gravy train switching tracks?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #41
    [QUOTE=DimPrawn;458471]Okay, I'm interested. What's the following snippet in VB.NET?

    Code:
    Func<int, bool> myFunc = x => x == 5;
        bool result = myFunc(4); // returns false of course
    I'm no VB.net expert but wouldn't the first one be something like...

    Code:
    Dim myFunc As Func(Of Integer, Bool) = function(x) x == 5
    Dim bool = myFunc(4)   'returns false
    I though you could do lambda expressions as callable delegates in VB.net now - or am I wrong?

    You've come right out the other side of the forest of irony and ended up in the desert of wrong.

    Comment


      #42
      Looks plausible.

      I've never had need to look at VB.NET so wondered if it had the newer features of C# baked in.

      What about the anonymous type example?

      Comment


        #43
        Originally posted by DimPrawn View Post
        Looks plausible.

        I've never had need to look at VB.NET so wondered if it had the newer features of C# baked in.

        What about the anonymous type example?
        Yes lambda expressions are in VB9 as are anonymous types
        Last edited by dotnetter; 18 February 2008, 16:05.

        Comment


          #44
          Originally posted by DimPrawn View Post
          Looks plausible.

          I've never had need to look at VB.NET so wondered if it had the newer features of C# baked in.

          What about the anonymous type example?
          Code:
          Dim person = New With {
          .ID =1,
          .Name = "John Smith",
          .Age = 37,
          .Height = 1.34
          }
          Last edited by bogeyman; 18 February 2008, 16:08.

          You've come right out the other side of the forest of irony and ended up in the desert of wrong.

          Comment


            #45
            Originally posted by chicane View Post
            They're clearly swamped with too much VB.NET development work to bother with nonsense like this.
            lol I havn't actually touched VB in the last year or so, but it's wasn't hard to spend 10 mins working it out, it's weird how uncomfortable it can be writing in a language other than the one you use every day.

            My first ever contract I was hired as a VB.Net developer, but the client wasn't fussed weather it was written in C# or VB so I opted for C# as it was a good oppurtinity to get comfortable with it. I delivered the app within my one month contract and that earned me a years experience in C# and havn't looked back since lol

            Comment


              #46
              Originally posted by PAH View Post
              I think VB has been brought on par with C# regarding 99% of the OO stuff. I suppose it's a case of getting used to the terminology and understanding the real differences between the two languages, apart from the syntax. Oh well, will keep me busy for a while.
              Given the choice, I can't imagine anyone wanting to code in VB.Net rather than C#. VB syntax is so clumsy.

              If you're any sort of programmer at all, it won't take you longer than a few days to make the transition, especially if you know any vaguely C-style languages.

              The O'Reilly book 'C# Essentials' by Albahari, Drayton and Merrill is all you should need if you already know the .net framwork.

              You've come right out the other side of the forest of irony and ended up in the desert of wrong.

              Comment


                #47
                Originally posted by bogeyman View Post
                Given the choice, I can't imagine anyone wanting to code in VB.Net rather than C#. VB syntax is so clumsy.

                If you're any sort of programmer at all, it won't take you longer than a few days to make the transition, especially if you know any vaguely C-style languages.

                The O'Reilly book 'C# Essentials' by Albahari, Drayton and Merrill is all you should need if you already know the .net framwork.

                A lot of the syntax is familiar due to my exposure to javascript, and seeing as the functionality seems to be on par between the two, it's just learning the terminology, particularly for any technical tests.

                In some ways contracting can be bad for the skills. My recent contracts have been so simple I've forgotten a lot of the more involving object based stuff. I wish I was as disciplined as one guy I worked with who regularly knocked up stuff on the side just to get up to speed with new skills, and keep those not being fully utilised fresh in the mind. He was almost 10 years younger than me so no doubt a lot less jaded and certainly more eager to push himself.
                Feist - 1234. One camera, one take, no editing. Superb. How they did it
                Feist - I Feel It All
                Feist - The Bad In Each Other (Later With Jools Holland)

                Comment


                  #48
                  Originally posted by PAH View Post
                  A lot of the syntax is familiar due to my exposure to javascript, and seeing as the functionality seems to be on par between the two, it's just learning the terminology, particularly for any technical tests.

                  In some ways contracting can be bad for the skills. My recent contracts have been so simple I've forgotten a lot of the more involving object based stuff. I wish I was as disciplined as one guy I worked with who regularly knocked up stuff on the side just to get up to speed with new skills, and keep those not being fully utilised fresh in the mind. He was almost 10 years younger than me so no doubt a lot less jaded and certainly more eager to push himself.
                  Yes I understand. Sometimes it's hard to get into the groove and sit down and learn new stuff. But can you really afford not to?

                  Most of the time freelancers have to pay for their own training, or spend time learning themselves. Goes with the job and always has done.

                  If you develop anything in the Windows world, C# is a 'must have' skill these days, surely.

                  Give it a bash. You can download the C# compiler and basic VS IDE (Express Edition?) for nowt.

                  You've come right out the other side of the forest of irony and ended up in the desert of wrong.

                  Comment


                    #49
                    Originally posted by bogeyman View Post
                    Given the choice, I can't imagine anyone wanting to code in VB.Net rather than C#. VB syntax is so clumsy.
                    For real clumsiness you need Cobol.Net.

                    Comment


                      #50
                      Originally posted by bogeyman View Post
                      Yes I understand. Sometimes it's hard to get into the groove and sit down and learn new stuff. But can you really afford not to?

                      Most of the time freelancers have to pay for their own training, or spend time learning themselves. Goes with the job and always has done.

                      If you develop anything in the Windows world, C# is a 'must have' skill these days, surely.

                      Give it a bash. You can download the C# compiler and basic VS IDE (Express Edition?) for nowt.

                      What happend to the term you can't teach an old dog new tricks? I have that as my motto.

                      If only I hadn't spunked away all that dosh when I could have been saving or investing it, I wouldn't have to worry about keeping my skills up to date.
                      Feist - 1234. One camera, one take, no editing. Superb. How they did it
                      Feist - I Feel It All
                      Feist - The Bad In Each Other (Later With Jools Holland)

                      Comment

                      Working...
                      X