-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Bassam Alugili edited this page Jan 27, 2017
·
11 revisions
#Welcome to the CSharp7Features wiki!
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;
Declare out variablie inline.
public static void OutVarTest(string @int)
{
int.TryParse(@int, out int t);
Console.WriteLine(t);
}
Nesting functions inside other functions to limit their scope and visibility.
-
Better performance
-
Reduced memory pressure
public static void BasicExample(){// Lambda FunctionAction lambdaFun = () => Console.WriteLine("I'm Lambda");lambdaFun.Invoke();// Local Functions Basicvoid EmptyLocalFunction(){Console.WriteLine("I'm Local");};EmptyLocalFunction();}
