Presentation is loading. Please wait.

Presentation is loading. Please wait.

.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#

Similar presentations


Presentation on theme: ".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#"— Presentation transcript:

1 .NET 3.5 – Mysteries

2 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# 2.0, VB 8.0, VS 2005 Add-on NetFx 3.5 C# 3.0, VB 9.0, VS 2008 NetFx 3.5 S P1 C# 3.0, VB 9.0, VS 2008 SP1 NetFx 4.0 C# 4.0, VB 10.0, VS 2010

3 NetFx 3.5 Feature List Automatic Properties Object and Collection Initializers Extension Methods Lambda Expressions Implicit Typing Anonymous Method/Types Partial Methods LINQ

4 Automatic Properties Two-in-one. Clean, Compact and Concise. Makes Visual Basic programmers jealous. Speed, speed, speed! public class Person { private string _firstName; public string FirstName { get { return _firstName; } set { _firstName = value; } } public class Person { public string FirstName { get; set; } }

5 Object and Collection Initializers Did you C this? What’s the best one-liner of.Net? Object and Collection Initializers. Named assignments. Isn’t intelliSense just wonderful? A little helping hand. Person person = new Person(); person.FirstName = "Scott"; person.LastName = "Guthrie“; person.Age = 32; great "syntactic sugar" language feature called "object Initializers" that allows you to-do this and re-write the above code like so: Person person = new Person { FirstName="Scott", LastName="Guthrie", Age=32 };

6 Extension Methods Static Implementation. Scoped in namespace. Limited access and Low priority. Fuel for the LINQ Engine. string email = Request.QueryString["email"]; if ( email.IsValidEmailAddress() ) { }

7 Lambda Expressions The next step… Concise and not that complex. Just like anonymous method, but smaller. Can be converted to a Expression Tree. Why do we need it?

8 Implicit Typing It’s implicit, not dynamic. Specific rules to follow. Helps with LINQ Helps with Generic Extension Methods Helps with Lambda Expressions

9 Anonymous Methods create inline un-named methods in your code int[] EvenInts = Array.FindAll (Ints, delegate(int ints) { return (ints % 2 == 0); } );

10 Anonymous Types allow you to create a class structure on the fly. var dog = new { Breed = "Cocker Spaniel", Coat = "black", FerocityLevel = 1 };

11 Partial Methods Its also not a method defined in two files. So, what is a partial method after all? A separation of declaration and definition. What, how can it disappear? Why do we need it? partial class PartialMethods //Part 1 { static void Main() { Do(); } static partial void Do(); } partial class PartialMethods //Part 2 { static partial void Do() {} }

12 All concepts in one code

13 LINQ Implicit Typi ng. LINQ to SQL. Extension M ethods. LINQ to Obje cts. LINQ to XML. Lambda Exp ressions. Expression T rees. The Mysterious LINQ

14 LINQ So, what is LINQ( Language-INtegrated Query) ? –It extends C# and Visual Basic with native language syntax for queries and provides class libraries t o take advantage of these capabilities. LINQ to SQL. LINQ to Objects. LINQ to XML. How does it work?

15 Summary Did we miss the Foundations? What about Service Pack 1? –WPF improvements –.NET Framework 3.5 SP1 Optimized Client Runtime –New ADO.NET Data Features ADO.NET Entity Framework ADO.NET Data Services –New ASP.NET Features ASP.NET Dynamic Data Improved ASP.NET AJX Support Why 3.5 when 4 is already out? Can I use Visual Studio 2010 with 3.5? –Yes, because of multi-targeting feature

16 Enter Text Here Thank You


Download ppt ".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#"

Similar presentations


Ads by Google