Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. C# 3’s lambda etc..... Do I really need this

C# 3’s lambda etc..... Do I really need this

Scheduled Pinned Locked Moved The Lounge
csharplinqcomfunctional
37 Posts 27 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K keencomputer

    Do I really need to learn this C# 3’s lambda whatever...........

    Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

    K Offline
    K Offline
    Kevin McFarlane
    wrote on last edited by
    #3

    Yes.

    Kevin

    1 Reply Last reply
    0
    • K keencomputer

      Do I really need to learn this C# 3’s lambda whatever...........

      Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #4

      Yes.

      Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon Judah Himango

      1 Reply Last reply
      0
      • C Chris Meech

        Absolutely. Become a good shepherd and learn all about lambs, ... Oh my bad. You said lambda. Sorry. :)

        Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #5

        He should start off on learning to dance the salsa before moving onto the lambada.

        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

        My blog | My articles | MoXAML PowerToys | Onyx

        C C C 3 Replies Last reply
        0
        • K keencomputer

          Do I really need to learn this C# 3’s lambda whatever...........

          Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

          S Offline
          S Offline
          Shelby Robertson
          wrote on last edited by
          #6

          Yes. And I must add that after you get used to using them there are some excellent everyday uses.

          Ennis Ray Lynch, Jr. wrote:

          Unpaid overtime is slavery.

          Trollslayer wrote:

          Meetings - where minutes are taken and hours are lost.

          T 1 Reply Last reply
          0
          • K keencomputer

            Do I really need to learn this C# 3’s lambda whatever...........

            Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

            B Offline
            B Offline
            Brady Kelly
            wrote on last edited by
            #7

            seeing it's popular, "Yes!" :laugh:

            1 Reply Last reply
            0
            • K keencomputer

              Do I really need to learn this C# 3’s lambda whatever...........

              Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #8

              Errm - they aren't just for C#, and no you don't. You could just continue coding with gotos and monolithic procedures if you really wanted to. After all, who needs these fancy, schmancy features? Productivity is for wimps after all.

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              B K A V 4 Replies Last reply
              0
              • K keencomputer

                Do I really need to learn this C# 3’s lambda whatever...........

                Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

                D Offline
                D Offline
                Dario Solera
                wrote on last edited by
                #9

                Once you get them, they're totally, absolutely awesome. Besides that, it only really takes 10 minutes.

                If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki v3

                B 1 Reply Last reply
                0
                • K keencomputer

                  Do I really need to learn this C# 3’s lambda whatever...........

                  Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

                  J Offline
                  J Offline
                  Jorgen Sigvardsson
                  wrote on last edited by
                  #10

                  Yes, unless you have something against expressive and easy to follow code...

                  B 1 Reply Last reply
                  0
                  • K keencomputer

                    Do I really need to learn this C# 3’s lambda whatever...........

                    Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #11

                    They're just like nameless methods (from C# 2), but instead of the delegate keyword you have => What's there to learn?

                    J M 2 Replies Last reply
                    0
                    • L Lost User

                      They're just like nameless methods (from C# 2), but instead of the delegate keyword you have => What's there to learn?

                      J Offline
                      J Offline
                      Judah Gabriel Himango
                      wrote on last edited by
                      #12

                      That's not all there is to them. Code-as-data. It's what enables Linq-to-SQL and the million + 1 LINQ providers out there.

                      Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon Judah Himango

                      1 Reply Last reply
                      0
                      • L Lost User

                        They're just like nameless methods (from C# 2), but instead of the delegate keyword you have => What's there to learn?

                        M Offline
                        M Offline
                        MidwestLimey
                        wrote on last edited by
                        #13

                        Unless, of course, he never used anonymous methods either ....

                        10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011

                        T 1 Reply Last reply
                        0
                        • K keencomputer

                          Do I really need to learn this C# 3’s lambda whatever...........

                          Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

                          J Offline
                          J Offline
                          J Dunlap
                          wrote on last edited by
                          #14

                          No, you don't *have* to, but they're extremely useful and I'd highly recommend it. I wrote an article to help out with the learning process: Lambda Expressions and Expression Trees: An Introduction[^] </shameless-plug> Also check out extension methods because a lot of the places where lambdas are used involve extension methods as well. (Whoa, that's cool! :omg: I pasted the link to my article and it automatically put in the link with the article's title! Good work Chris and co! :cool: )

                          S D 2 Replies Last reply
                          0
                          • P Pete OHanlon

                            He should start off on learning to dance the salsa before moving onto the lambada.

                            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                            My blog | My articles | MoXAML PowerToys | Onyx

                            C Offline
                            C Offline
                            Chris Meech
                            wrote on last edited by
                            #15

                            :-D

                            Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

                            1 Reply Last reply
                            0
                            • J J Dunlap

                              No, you don't *have* to, but they're extremely useful and I'd highly recommend it. I wrote an article to help out with the learning process: Lambda Expressions and Expression Trees: An Introduction[^] </shameless-plug> Also check out extension methods because a lot of the places where lambdas are used involve extension methods as well. (Whoa, that's cool! :omg: I pasted the link to my article and it automatically put in the link with the article's title! Good work Chris and co! :cool: )

                              S Offline
                              S Offline
                              Shelby Robertson
                              wrote on last edited by
                              #16

                              J. Dunlap wrote:

                              Also check out extension methods because a lot of the places where lambdas are used involve extension methods as well.

                              Good call. My most frequent use of lambdas are with extension methods for collections to do things like Where, Select, Sorting, etc.

                              Ennis Ray Lynch, Jr. wrote:

                              Unpaid overtime is slavery.

                              Trollslayer wrote:

                              Meetings - where minutes are taken and hours are lost.

                              B 1 Reply Last reply
                              0
                              • P Pete OHanlon

                                Errm - they aren't just for C#, and no you don't. You could just continue coding with gotos and monolithic procedures if you really wanted to. After all, who needs these fancy, schmancy features? Productivity is for wimps after all.

                                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                My blog | My articles | MoXAML PowerToys | Onyx

                                B Offline
                                B Offline
                                Brady Kelly
                                wrote on last edited by
                                #17

                                And unprofessional coders.  Never forget the large proportion of progressive and educated development professionals that churn out unprofessional code when they fall prey to these Satanic and Lazy constructs that have only recently been accommodated in the most Utopian language and runtime that is C# 3.0 on .NET Framework 3.5.  OK, that felt a bit like little boy scouts probably felt when they held Nazi banners up high for visiting diplomats and politicians.

                                1 Reply Last reply
                                0
                                • J Jorgen Sigvardsson

                                  Yes, unless you have something against expressive and easy to follow code...

                                  B Offline
                                  B Offline
                                  Brady Kelly
                                  wrote on last edited by
                                  #18

                                  Oh, heathen!  What is wrong with redundantly declared (non-)anonymous methods, used in shelf-operations like "Distinct".  Oh the code. it haunts me so not having to rewrite an debug it, but I'm not a professional coder, so I must either get used to debugging boilerplate, or shape up and stop rewriting code with spelling and typing mistakes.  I mean, I had the logic correct all the time, but these little agents of the Dark One keep throwing magnetic spanners in my freaking production line for "Real Life Output".

                                  1 Reply Last reply
                                  0
                                  • S Shelby Robertson

                                    J. Dunlap wrote:

                                    Also check out extension methods because a lot of the places where lambdas are used involve extension methods as well.

                                    Good call. My most frequent use of lambdas are with extension methods for collections to do things like Where, Select, Sorting, etc.

                                    Ennis Ray Lynch, Jr. wrote:

                                    Unpaid overtime is slavery.

                                    Trollslayer wrote:

                                    Meetings - where minutes are taken and hours are lost.

                                    B Offline
                                    B Offline
                                    Brady Kelly
                                    wrote on last edited by
                                    #19

                                    This whole extension method, new-fangled thang is more dangerous than gay marriage!  Vote to stop it before it gets to your youth. :suss: Thatv was a lot easier to squeeze in that a programming post. :laugh:

                                    1 Reply Last reply
                                    0
                                    • P Pete OHanlon

                                      He should start off on learning to dance the salsa before moving onto the lambada.

                                      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                      My blog | My articles | MoXAML PowerToys | Onyx

                                      C Offline
                                      C Offline
                                      Chris Losinger
                                      wrote on last edited by
                                      #20

                                      tonight we will use the lambda, the forbidden construct !

                                      image processing toolkits | batch image processing

                                      1 Reply Last reply
                                      0
                                      • K keencomputer

                                        Do I really need to learn this C# 3’s lambda whatever...........

                                        Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

                                        C Offline
                                        C Offline
                                        Chris Austin
                                        wrote on last edited by
                                        #21

                                        Probably not...but I've been using lambdas in different languages for about a decade now and it is pretty darn handy at times. Right tool for the job and what not.

                                        And above all things, never think that you're not good enough yourself. A man should never think that. My belief is that in life people will take you at your own reckoning. --Isaac Asimov Avoid the crowd. Do your own thinking independently. Be the chess player, not the chess piece. --Ralph Charell

                                        1 Reply Last reply
                                        0
                                        • K keencomputer

                                          Do I really need to learn this C# 3’s lambda whatever...........

                                          Tapas Shome System Software Engineer Keen Computer Solutions 1408 Erin Street Winnipeg, Manitoba Canada R3E 2S8 http://www.keencomputer.com www.ias-research.com/blog

                                          S Offline
                                          S Offline
                                          Super Lloyd
                                          wrote on last edited by
                                          #22

                                          God No! But if you ever learn it accidentally you will be surprised by how easy and useful it is and you will regret not having learn it before!

                                          A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups