The Codex of Business Writing Software for Real-World Solutions 2.pptx
Donetconf2016: The Future of C#
1. The Future ofC#
Jon Limjap
Microsoft MVP forVisual Studio and DevelopmentTechnologies
Philippine .NET Users Group Lead
2. About Me
Microsoft MVP forVisual Studio and
DevelopmentTechnologies
CTO & Co-Founder, NomadTravlr Inc.
Lead, Philippine .NET Users Group
http://jonlimjap.net
@lattex | jonlimjap@gmail.com
17. Microsoft’s changing tune…
Run onWindows
.NET as system component
Run onVM (CLR)
Black box compilers
Edit inVisual Studio
Proprietary
Run everywhere
Deploy with app
Compile to native
Open compiler APIs
Use your favorite editor
Open source
19. Digit
separators
int bin = 0b1001_1010_0001_0100;
int hex = 0x1b_a0_44_fe;
int dec = 33_554_432;
int weird = 10000_000;
double real = 1_000.111_1e-1_000;
21. Ref returns
and Ref Locals
string[] myArray = { "one", "two", "three" };
WriteLine($"The first element of the array is {myArray[0]}");
ref string n = ref FirstElement(myArray);
n = "other"; //myArray[0] now equals "other"
WriteLine($"The first element of the array has become
{myArray[0]}");
24. Tuples
public (int x, int y) Compute(){}
// Call the method
var (x,y) = Compute();
public (int sum, int count) Tally(IEnumerable<int> values)
{
sum = 0; count = 0;
foreach (var value in values) { sum += value; count++; }
return (sum,count);
}
26. RecordTypes
//Instead of:
public class Cube
{
public int Width { get; set; }
public int Height { get; set; }
public int Depth { get; set; }
}
//We write this:
public class Cube(int Width, int Height, int Depth)