?
VS2015 c#6.0 is not implemented in the / Supported features
?
1 , array enhancement: Assignment
1 Dimension Array
int[] Numbers ;
Numbers = {2,3,4,5};
2 Dimension Array
int[,] numbers2;
numbers2= {[2,3,4,5],{6,7,8,9}};
2. Type enhancement: can extend existing types
3, expression enhancement: can overload any operator
1 Extend Existing int type, overloaded exponentiation operator
public static partial struct INT
{
public static operator * * (int a, int b)
{return ...;}
}
Call
int result = 4**3; 4*4*4
int result =
2 extending an existing array, overloading arithmetic characters
public static partial class int[]
{public static operator + (int[] A, int[] B);
}
Call
Int[] A, b;
int[] C = a+b;
3. Extend existing Complex, add attributes
public static partial class Complex
{Public Complex I
{Get
{Complex result = new Complex (0,1);
return result;
}
}
}
Call
Complex C = 1+2*i;//1+2i;
For type safety, avoid confusion, you need to reference a dedicated namespace
Using namespace lim;//
The namespace is placed under language integrated mathematics.
In languages that do not support arbitrary operators, operators are automatically converted to static functions
For example exponentiation Operation ** in general languages can be converted to multiply_multiply (,);
?
?
No implementation/Support features in VS2015 c#6.0