Download presentation
Presentation is loading. Please wait.
Published byClement Phelps Modified over 8 years ago
1
Visual Studio 2010 and.NET Framework 4 Training Workshop
2
Presentation Outline (hidden slide): Technical Level: 300 Intended Audience: Developers & Architects Objectives (what do you want the audience to take away): Understand the new features and improvements to C# 4.0 Understand the new features and improvements to VB 10 Understand the ongoing relationship between C# and VB as they both evolve Presentation Outline: Where we’re at today LINQ/Declarative Language Trends C# (Evolution -> C# 4.0) Co-Evolution VB (Evolution -> VB 10) DLR
3
What’s New In C# 4.0 and Visual Basic 10 Name Title Organization Email
4
Where We’re At Today Our managed languages are starting to share some very similar features: Functional Concise Declarative
5
Before IList FindParentsWithChildNamed(string childName) { var matches = new List (); foreach(var person in _people) { foreach(var child in person.Children) { if (child.Name.Equals(childName)) { matches.Add(person); break; } return matches; } LINQ, The Power of Declarative
6
IList FindParentsWithChildNamed(string childName) { var matches = from person in people from child in person.Children where child.Name.Equals(childName) select person; return matches.ToList(); } After LINQ, The Power of Declarative
7
Why Declarative Matters… ImperativeDeclarative What How
8
Addressing Language Trends Declarative ConcurrentDynamic
9
The Evolution of C# C# 1.0 C# 2.0 C# 3.0 Managed Code Generics LINQ C# 4.0 Dynamic
10
New C# 4.0 Features 1.Late-Binding Support 2.Named and Optional Parameters 3.Improved COM Interop 4.Covariance and Contravariance
11
Simplifying Your Code with C# 4.0
12
Co-evolving C# and VB Think of co-evolution as a game of leap-frog…
13
There’s a problem when co-evolution doesn’t exist…
14
The Evolution of Visual Basic VB1 – VB3 VB4-VB6 VB7-VB9 Windows Programming Made Easy Components Made Easy Power and Simplicity for.NET VB10 Continuing the trend
15
New VB10 Features 1.Auto-Implemented Properties 2.Collection Initializers 3.Statement Lambdas 4.Covariance and Contravariance 5.Implicit Line Continuation
16
VB 10
17
Why a “Dynamic Language Runtime”? Common Language Runtime Statically-Typed C# VB Ruby Python Dynamically-Typed
18
Why a “Dynamic Language Runtime”? Common Language Runtime Statically-Typed C# VB Ruby Python Dynamically-Typed Dynamic Language Runtime
19
Python Binder Ruby Binder COM Binder JScript Binder Object Binder.NET Dynamic Programming Dynamic Language Runtime Expression Trees Dynamic Dispatch Call Site Caching IronPython IronRuby C# VB.NET Others…
20
Dynamically Typed Objects Calculator calc = GetCalculator(); int sum = calc.Add(10, 20); object calc = GetCalculator(); Type calcType = calc.GetType(); object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 10, 20 }); int sum = Convert.ToInt32(res); ScriptObject calc = GetCalculator(); object res = calc.Invoke("Add", 10, 20); int sum = Convert.ToInt32(res); dynamic calc = GetCalculator(); int sum = calc.Add(10, 20); Statically typed to be dynamic Dynamic method invocation Dynamic conversion
21
Dynamic Language Interop
22
Summary… 1.Targeting the current trends in programming languages 2.Addressing current pain points in developing for Windows and the.NET Framework 3.Laying the foundation to enable developers to solve tomorrow’s problems
24
What Is F#? F# Is… 1.A Functional Programming Language derived from OCaml and the ML family of languages 2.Included with Visual Studio 2010 3.Very good for compute-intensive problems, highly parallel problems, and language-oriented programming
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.