Lambda Expressions Matt Van Horn Software Engineer Iverson Gaming Systems, Inc.

Slides:



Advertisements
Similar presentations
Optional Static Typing Guido van Rossum (with Paul Prescod, Greg Stein, and the types-SIG)
Advertisements

LINQ and Collections An introduction to LINQ and Collections.
James Kolpack, InRAD LLC popcyclical.com. CodeStock is proudly partnered with: Send instant feedback on this session via Twitter: Send a direct message.
CSCI 160 Midterm Review Rasanjalee DM.
Extension Methods, Anonymous Types LINQ Query Keywords, Lambda Expressions Svetlin Nakov Telerik Corporation
Copyright © 2012 Pearson Education, Inc. Chapter 9 Delegates and Events.
.NET 3.5 – Mysteries. NetFx Evolution NetFx 1.0 C# 1.0, VB 7.0, VS.NET NetFx 1.1 C# 1.1, VB 7.1, VS 2003 NetFx 2.0 C# 2.0, VB 8.0, VS 2005 NetFx 3.0 C#
C# and LINQ Yuan Yu Microsoft Research Silicon Valley.
Presented by: Andrew Gray 1Introduction to LINQ and Lambda Expressions.
1 Modularity In “C”. 2 General Syntax data_type function_Name (parameter list) { … return expression; // return output } Body of the function is a compound.
From Noob To Game Developer academy.zariba.com Overview Lecture 1.
2.3 Cool features in C# academy.zariba.com 1. Lecture Content 1.Extension Methods 2.Anonymous Types 3.Delegates 4.Action and Func 5.Events 6.Lambda Expressions.
Introduction to PL/SQL Chapter 9. Objectives Explain the need for PL/SQL Explain the benefits of PL/SQL Identify the different types of PL/SQL blocks.
PARALLEL PROGRAMMING ABSTRACTIONS 6/16/2010 Parallel Programming Abstractions 1.
 Introduction  What is LINQ  Syntax  How to Query  Example Program.
Extension Methods Programming in C# Extension Methods CSE Prof. Roger Crawfis.
Advanced .NET Programming I 13th Lecture
Delegates and lambda functions Jim Warren, COMPSCI 280 S Enterprise Software Development.
Putting it all together: LINQ as an Example. The Problem: SQL in Code Programs often connect to database servers. Database servers only “speak” SQL. Programs.
Advanced C#, part IV Niels Hallenberg IT University of Copenhagen (With thanks to Peter Sestoft and Kasper Østerbye) BAAAP – Spring 2009.
Extension Methods, Anonymous Types LINQ Query Keywords, Lambda Expressions Based on material from Telerik Corporation.
EGR 2261 Unit 8 One-dimensional Arrays  Read Malik, pages in Chapter 8.  Homework #8 and Lab #8 due next week.  Quiz next week.
1 nd Semester Module7 Arrays Thanawin Rakthanmanon Create by: Aphirak Jansang Computer Engineering Department Kasetsart.
Array in C++ / review. An array contains multiple objects of identical types stored sequentially in memory. The individual objects in an array, referred.
Delegates and Events Callback Functionality and Event-Driven Programming Svetlin Nakov Technical Trainer Software University
Going Functional Primož Gabrijelčič. Functional programming.
C# 3.0 and LINQ Pavel Yosifovich CTO, Hi-Tech College
Lambda Expressions Version 1.0
AP Computer Science edition Review 1 ArrayListsWhile loopsString MethodsMethodsErrors
Callback Functionality and Event-Driven Programming
C#: Future Directions in Language Innovation Anders Hejlsberg TLN307 Technical Fellow Microsoft Corporation.
CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Advanced.NET Programming I 10 th Lecture Pavel Ježek
Inside LINQ to Objects How LINQ to Objects work Inside LINQ1.
Using variable Variables are used to store values.
Other news? async and await Anonymous types (var, dynamic) Tuples Object instantiation Extension methods UCN Teknologi/act2learn1FEN 2014.
IAP C# 2011 Lecture 2: Delegates, Lambdas, LINQ Geza Kovacs.
CS412/413 Introduction to Compilers Radu Rugina Lecture 11: Symbol Tables 13 Feb 02.
LINQ and Lambda Expressions Telerik Software Academy LINQ Overview.
1 st Semester Module 7 Arrays อภิรักษ์ จันทร์สร้าง Aphirak Jansang Computer Engineering Department.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
JavaScript Variables. Definition A variable is a "container" for information you want to store. A variable's value can change during the script.
Introduction to programming in java Lecture 21 Arrays – Part 1.
Methods Matthew Harrison. Overview ● There are five main aspects of methods... ● 1) Modifiers – public, private ● 2) Method Name ● 3) Parameters ● 4)
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
© 2016, Mike Murach & Associates, Inc.
Lambda Expressions Version 1.1
Tech·Ed North America /18/2018 2:05 PM
Week of 12/12/16 Test Review.
Lambda Expressions By Val Feldsher.
Microsoft .NET 3. Language Innovations Pan Wuming 2017.
Delegates/ Anders Børjesson
.NET and .NET Core: Languages, Cloud, Mobile and AI
REBOL Writing Functions.
.NET and .NET Core 5.2 Type Operations Pan Wuming 2016.
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
6 Delegate and Lambda Expressions
Software Engineering Lecture #13.
STL - Algorithms.
LINQ & ADO.NET Entity Framework
G. Pullaiah College of Engineering and Technology
Can we solve this problem?
COM 2009 – Opening Reception at Dynamic Earth
Can we solve this problem?
LINQ - 2 Ravi Kumar C++/C# Team.
IT College 2016, Andres käver
Tic-Tac-Toe Game Engine
Advanced .NET Programming I 6th Lecture
Java Coding 6 David Davenport Computer Eng. Dept.,
Chengyu Sun California State University, Los Angeles
Presentation transcript:

Lambda Expressions Matt Van Horn Software Engineer Iverson Gaming Systems, Inc. @phpn00b

We thank the following companies for their gracious sponsorship Platinum Sponsors Gold Sponsor

What is a Lambda Expression ( => ) Why should I use Lambda Expressions What is a Delegate?

Syntax => Goes To (input parameters) => expression () => SomeMethod() (int x, string s) => s.Length > x (x, y) => x == y (input parameters) => {statement;}

Expressions + LINQ Func(T, TResult) is the most useful type of lambda for the average developer. Strong typed input and output.Where(obj =>obj.Name == Matt) Compiler can normally guess the type for T

Dynamic Lists Example (input parameters) => expression Single statement

statements! Ask your self is it method worthy code? If not make it anonymous function! Declare single use code inline! Reduce the chance of lookup whiplash! Many private methods can be a lambdize!

Func == awesome! Easy way to store a lambda that you use over and over again! Func findMatt = p=>p.Name == Matt; var matts = people.Where(findMatt);

Action == useful! people.ForEach(p => p.FirstName = );

l