2. Solutions Architect for BRDNUG leader, http://brdnug.org MS Patterns & Practices SP Guidance Advisor SQLSat28 Organizer http://twitter.com/mhuguet http://geekswithblogs.com/mikehuguet Mike Huguet
3. A.K.A â âHuggyâ Bear What does he do anyway? Favorite restaurant is any $5 Chinese Buffet He only quotes movies from the 80âs Alternate Intro
4. Introduce some of the ânewâ fundamentals Enhance knowledge of these fundamentals Objectives Face.Expression!=
10. Native to the CLR Allow for better type safety increasing performance (no box, unbox, casting) ArrayList vs. List<T> IDE Magic What are Generics?
11. *200% perf gain value types (i.e.-string, intâŠ) *100% perf gain ref types (i.e.-MyClass) Used throughout .NET Make great containers i.e.-List<T> Activator.CreateInstance<T>() Uses / Benefits * - #âs from MSDN
12. C# List<string> x = new List<string>(); String GetValueAsString<T>(T entity) {} VB.NET Dim x As New List(Of String) Function GetValueAsString(of T)(ByRef entity As T) As String Syntax
16. ? Extension Methods âExtension methods enable you to âaddâ methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type.â -MSDN
17. Allows adding methods to an existing type No recompile needed Can extend framework classes (including sealed) Methods included in Intellisense Extension Methods
19. ? Lamda Expressions âA lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.â -MSDN
34. Summary - Wherever a delegate type can be used Event handlers LINQ Projection Extensions (Select, SelectMany) Find Extensions (Find, FindAll) When Can We Use Them?
36. ? Language Integrated Query (LINQ) âLINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. .â -MSDN
38. Expression based var results = from process in Process.GetProcesses() where process.ProcessName.Contains("WINWORD") orderbyprocess.MainWindowTitle descending select process; Method based varresults = Process.GetProcesses() .Where(process=>process.ProcessName .Contains("WINWORD")) .OrderBy(x=>x.MainWindowTitle); LINQ Options
40. LINQ C# VB Other Languages .NET Language â Integrated Query LINQ enabled data sources LINQ enabled ADO.NET LINQ to Objects LINQ to XML LINQ to Datasets LINQ to SQL LINQ to Entities Objects Relational Data XML
41. LINQ to ⊠LINQ to Objects LINQ to XML (XLINQ) LINQ to DataSets LINQ to SQL (DLINQ) LINQ to Entities (EF) LINQ to SharePoint LINQ to REST LINQ to NHibernate LINQ to Twitter LINQ to SQL Saturday???