Using static classes as directive

Earlier Releases

  1. using System.Console;
  2. using System.Convert;

Current Release (VS 2015)

  1. using static System.Console;
  2. using static System.Convert;
  1. Now we need add static keyword to use static classes as directive.
  2. In previous release apart from namespace we can use static classes. But in current release (VS 2015) using static keyword we can include static classes & non static classes, too.

    For code snippet of Static Classes as directive visit here & for Non-Static classes as directive visit here.

Primary Constructors

Earlier Releases

  1. namespace PrimaryConstructorDemo
  2. {
  3. class PrimaryConstructorDemo(int employeeId, string empName, string empDesignation)
  4. {
  5. public int EmployeeId { get; } = employeeId;
  6. public string EmployeeName { get; } = empName;
  7. public string EmployeeDesignation { get;} = empDesignation;
  8. }
  9. }
Current Release (VS 2015)

Declaration expressions in C#

Out parameters in VB