This one-day instructor-led (Level 300) course provides students with the knowledge and skills to develop applications in the .NET Framework 3.5 using the C# 3.0 programming language. This course serves as a bridge for proficient .NET Framework developers with C# 2.0 programming experience to the new features of the C# 3.0 programming language.
After completing this course, students will be able to:
• Develop applications using the C# 3.0 language in the .NET Framework 3.5
• Use advanced language constructs such as extension methods, anonymous types
Module 1: From C# 2.0 to C# 3.0
This module explains how to apply C# 3.0 language features in real applications, and provides the motivation for each feature, categorizing them into four distinct groups: Developer productivity features, Extensibility features, Functional programming features and LINQ support features.
Lessons
• Developer Productivity Features – Implicit typing, Object and collection initializes, Automatic properties, Anonymous types.
• Extensibility Features – Extension methods, Partial methods.
• Functional Programming Features – Lambda expressions, Expression trees.
• LINQ Support Features – An overview of language query operators.
Lab : Extension Methods and IEnumerable
• ForEach extension method for IEnumerable.
• MaxElement extension method for IEnumerable.
Lab : Extension Methods and Anonymous Types
• Extension method for turning anonymous types into tuples.
After completing this module, students will be able to:
• Extend existing types using extension methods.
• Use lambda expressions and expression trees for simple functions.
• Initialize collections and objects and use automatic properties and anonymous types to facilitate productivity.
Additional Resources:
To help you prepare for this class, review the following resources:
• Microsoft Developer Network: Introduction to Generics (C# Programming Guide) at:
http://msdn.microsoft.com/en-us/library/0x6a29h6.aspx
• Microsoft Developer Network: Iterators (C# Programming Guide) at:
http://msdn.microsoft.com/en-us/library/dscyy5s0.aspx
• Microsoft Developer Network: Anonymous Methods (C# Programming Guide) at:
http://msdn.microsoft.com/en-us/library/0yw3tz5k(VS.80).aspx
• Microsoft Developer Network Magazine: Create Elegant Code With Anonymous Methods, Iterators and Partial Classes at http://msdn.microsoft.com/en-gb/magazine/cc163682.aspx
This course is intended for developers with practical experience of at least 1 year with the C# 3.0 programming language and the .NET Framework.
Before attending this course, students must have:
• Practical experience of at least 1 year with the C# 3.0 language
• -or- Completed course 50150 or have equivalent knowledge