Skip to content
Bassam Alugili edited this page Jan 27, 2017 · 11 revisions

#Welcome to the CSharp7Features wiki!

C# 7 in Core

Binary Literals & Digits Separators

New langauge Syntax to improve readability for numeric constants.

int binary = 0b1001_1010_1001_0100;
int hex = 0x1c_a0_41_fe;
double real = 1_00.99_9e-1_000;

Out variables

Declare out variablie inline.

public static void OutVarTest(string @int)
{
  int.TryParse(@int, out int t);
  Console.WriteLine(t);
}

Clone this wiki locally