Net framework


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Net framework

  1. 1. Introduction to .NETFramework 3.5 and C# 3.0 Programming in C#
  2. 2. A look back … 3.5 3.0 .NET 1.0 .NET 1.1 .NET 2.0 .NET 4 2002 2003 2005-08 2008 CTP CLR 1.0 CLR 1.1 CLR 2.0 CLR 4
  3. 3. Architecture Win And WPF DLR ASP.NET WCF LINQ Forms more! Base Class Libraries The CLR JIT & Garbage Security Exception Loader & NGEN Collector Model Handling Binder
  4. 4. JIT Interpreted Static compilation compilation in execution before executing Just-in-time Compilation hybrid approach
  5. 5. NGEN use native image from cache instead using JIT compilation
  6. 6. Loader & Binder locating assemblies at run-time and binding to them.
  7. 7. WPF – Windows Presentation Foundation graphical subsystem for rendering UI in windows-based application Silverlight utilizes WPF to provide embedded web controls comparable to Adobe Flash but more focus on an UI object model and less on animation.
  8. 8. WCF – Windows Communication Foundation designing and deploying distributed applications under services- oriented architecture (SOA) implementation set of principle and methodologies for interoperable application
  9. 9. DLR – Dynamic language runtime a runtime environment that adds a set of services for dynamic languages to the common language runtime (CLR) Dynamic language identify the type of object at runtime whereas in statically type languages must specify object type at design time
  10. 10. New features of C# 3.0
  11. 11. Implicitly Typed Local Variables declare variables without specifying the type at design time Must be declared and initialized at the same time. var age; // Error, no initializer to infer the data type var age = 5; // Valid Cannot used as a return type and argument of method. Not possible for multiple declaration var age = 1, genre = “male”; // Error
  12. 12. Object Initializers Creates an object and initialize its fields and properties without a constructor
  13. 13. Auto-implemented Properties Creates an object and initialize its fields and properties without a constructor public string HouseName { get; set; }
  14. 14. Extension Methods Allows you to extend an existing type with new functionality without directly modifying those types Are static methods that have to be declared in a static class Declare an extension method by specifying the first parameter with this keyword static return-type MethodName (this type obj, param-list)
  15. 15. Collection Initializers ClassName objName = new CollectionClassName{ collection-initializer }
  16. 16. Predefined Generic Delegates Func<T, TResult>() Delegate Represents a method having one parameters type T and returns a value of type TResult public delegate TResult Func<TResult>()
  17. 17. Lambda Expressions is an alternative to anonymous methods. parameter-list => expression or statements