Presentation is loading. Please wait.

Presentation is loading. Please wait.

Joel Pobar Language Geek Microsoft DEV320 Improve on C#2.0 100% Backwards Compatible Language Integrated Query (LINQ)

Similar presentations


Presentation on theme: "Joel Pobar Language Geek Microsoft DEV320 Improve on C#2.0 100% Backwards Compatible Language Integrated Query (LINQ)"— Presentation transcript:

1

2 Joel Pobar Language Geek Microsoft DEV320

3 Improve on C#2.0 100% Backwards Compatible Language Integrated Query (LINQ)

4

5

6 C# 3.0C# 3.0 VB 9.0VB 9.0 OthersOthers.NET Language Integrated Query LINQ to Objects LINQ to DataSets LINQ to SQL LINQ to Entities LINQ to XML Objects XML Relational

7

8 Project Select, Return Select, Return Filter Where, Distinct Test Any( ), All( ) Join Join On = Join On = Group Group By, Aggregate, Group By, Aggregate, Group Join On = Aggregate Group Join On = Aggregate Aggregate Count( ), Sum( ), Min( ), Max( ), Avg( ), Group( )… Partition Skip [ While ], Take [ While ] Skip [ While ], Take [ While ] Set Union, Intersect, Except Order Order By, Order By,

9 Local Variable Type Inference Object Initializers Collection Initializers Anonymous Types Auto-Implemented Properties Extension Methods Lambdas Query Expressions Expression Trees Partial Methods Implicitly-Typed Arrays

10 Motivation Language Integrated Query C# 3.0 New Language Features

11 Technical Communities, Webcasts, Blogs, Chats & User Groups http://www.microsoft.com/communities/default.mspx Microsoft Developer Network (MSDN) & TechNet http://microsoft.com/msdn http://microsoft.com/technet Trial Software and Virtual Labs http://www.microsoft.com/technet/downloads/trials/default.mspx Microsoft Learning and Certification http://www.microsoft.com/learning/default.mspx Visual C# Developer Center http://msdn2.microsoft.com/en-us/vcsharp/default.aspx Visual Studio 2008 Beta1 Download Page http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx Visual Studio 2008 Samples http://msdn2.microsoft.com/en-us/bb330936.aspx

12

13

14 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

15 BinaryExpression ConstantExpression FuncletExpression InvocationExpression LambdaExpression MemberExpression MethodCallExpression NAryExpression NewArrayExpression NewExpression ParameterExpression TernaryExpression TypeBinaryExpression UnaryExpression

16 Expression: “a + b” ParameterExpression a = Expression.Parameter(typeof(int), "a"); ParameterExpression b = Expression.Parameter(typeof(int), "b"); BinaryExpression add = Expression.Add(a, b); Expression > l = Expression.Lambda >(add, a, b); Console.WriteLine(DoBinOp(l, 1, 2));

17 Param“a”Param“a” Param“b”Param“b” Binary “Add”


Download ppt "Joel Pobar Language Geek Microsoft DEV320 Improve on C#2.0 100% Backwards Compatible Language Integrated Query (LINQ)"

Similar presentations


Ads by Google