Wednesday 29 March 2017

C# Versions


C# Versions
C# Version
Release Date
Tool
Feature
1.0
2002
Visual Studio .Net
·         First release of .net
2.0
2005
Visual Studio 2005
·         Partial classes
·         Support for generics
·         Iterators
·         Nullable syntax
·         Anonymous methods
·         Static class
·         Volatile keyword
3.0
2008
Visual Studio 2008
·         Implicitly Typed Local Variables
·         Extension Methods
·         Lambda Expressions
·         Type Inference
·         Object and Collection Initializers
·         Anonymous Types
·         Automatically Implemented Properties
·         Expression Trees
4.0
2010
Visual Studio 2010
·         Support for Covariance and Contravariance
·         Optional parameters and named arguments
·         Support for Dynamic and DLR
·         Enhanced support for COM interop
5.0
2012
Visual Studio 2012
·         Async / Await Feature
·         Support for caller information
6.0
2015
Visual studio 2015
  • using Static.
  • Auto property initializer.
  • Dictionary Initializer.
  • nameof Expression.
  • New way for Exception filters.
  • await in catch and finally block.
  • Null – Conditional Operator.
  • Expression – Bodied Methods
  • Easily format strings – String interpolation
7.0
2016
Visual studio 2015 preview 4
·         Local functions – code available currently in github
·         Tuple Types and literals
·         Record Types
·         Pattern matching
·         Non Nullable reference types
·         Immutable types




.Net Version Release history

.Net Version Release history
.Net Version
Release Date
Tool
Feature
1.0
2002
Visual Studio .Net
·         First release of .net
1.1
2003
Visual Studio 2003
·         Support for ASP.Net mobile controls
·         Supports side-by-side execution
·         Security Changes
2.0
2005
Visual Studio 2005
·         Generics (with generic collection)
·         Nullable Types
·         Support of IPv6 addresses in .net remoting
·         Common Language Runtime 2.0
3.0
2006
·         WCF (Communication framework)
·         WPF (Presentation framework)
·         WF (Workflow Foundation)
3.5
2008
Visual Studio 2008
·         LINQ
·         Addin / Plugin Model (System.AddIn.Contract.dll)
4.0
2010
Visual Studio 2010
·         Parallel Computing
·         Code Contracts
·         Lazy Initialization
·         Dynamic Language Runtime
·         In-process side-by-side hosting
·         Background garbage collection
·         Covariance and Contravariance
·         Common Language Runtime 4.0
4.5
2012
Visual Studio 2012
·         Enhanced regular expression support
·         Default culture for application domain
·         Zip compression
·         Support of array with size more than 2GB
·         Asynchronous file operation
·         Improvement in parallel computing
4.5.1
2013
Visual Studio 2013
·         Debugger support for X64 edit and continue (EnC)
·         Debugger support for seeing managed return values
·         Async-aware debugging in the Call Stack and Tasks windows
·         Debugger support for analyzing .NET memory dumps (in the Visual Studio Ultimate SKU)
·         Tools for .NET developers in the Performance and Diagnostics hub
·         Code Analysis UI improvements
·         ADO.NET idle connection resiliency
4.5.2
2014
Visual studio 2013
·         For Windows Forms applications, improvements were made for high DPI scenarios.
·         For ASP.NET, higher reliability HTTP header inspection and modification methods are available as is a new way to schedule background asynchronous worker tasks
4.6
2015
Visual Studio 2015
·         Introduced RyuJIT, a new JIT compiler for 64-bit systems
·         Introduced Open Source .Net Framework Packages
·         Support for Code page encodings
·         Improvements to event tracing

4.6.1
2015
Visual Studio 2015
·         WPF improvements for spell check, support for per-user custom dictionaries and improved touch performance.
·         Enhanced support for Elliptic Curve Digital Signature Algorithm (ECDSA) X509 certificates.
·         Added support in SQL Connectivity for AlwaysOn, Always Encrypted and improved connection open resiliency when connecting to Azure SQL Database.
·         Azure SQL Database now supports distributed transactions using the updated System.Transactions APIs .
·         Many other performance, stability, and reliability related fixes in RyuJIT, GC, WPF and WCF.

4.6.2
2016
Visual Studio 2015
·         Support for paths longer than 260 characters
·         Support for FIPS 186-3 DSA in X.509 certificates
·         TLS 1.1/1.2 support for ClickOnce
·         Support for localization of data annotations in ASP.NET
·         Enabling .NET desktop apps with Project Centennial
·         Soft keyboard and per-monitor DPI support for WPF



Tuesday 28 March 2017

Task vs Thread differences in C#



When we execute things on multiple threads, it’s not guaranteed that the threads are separated across multiple processors.
Task is a lightweight object for managing a parallelizable unit of work. It can be used whenever you want to execute something in parallel. Parallel means the work is spread across multiple processors to maximize computational speed. Tasks are tuned for leveraging multicores processors.
Task provides following powerful features over thread.

  1. If system has multiple tasks then it make use of the CLR thread pool internally, and so do not have the overhead associated with creating a dedicated thread using the Thread. Also reduce the context switching time among multiple threads.
  2. Task can return a result. There is no direct mechanism to return the result from thread.
  3. Wait on a set of tasks, without a signaling construct.
  4. We can chain tasks together to execute one after the other.
  5. Establish a parent/child relationship when one task is started from another task.
  6. Child task exception can propagate to parent task.
  7. Task support cancellation through the use of cancellation tokens.
  8. Asynchronous implementation is easy in task, using’ async’ and ‘await’ keywords.