You can use Task.WhenAll() to run multiple tasks asynchronous in parallel!

It turns out that asynchronous method don't start new threads! I need to do more reading on this. Threading is only need when you run CPU intensive operations like a loop to perform math calculations.

Anders showed some JavaScript in which he consumed some C# code from within C# but he couldn't just use Task as-is and he had to bridge

the two through IAsynchOperation (didn't quite get why)

Anders is obviously a big proponent of static languages and took several jabs at the dynamic nature of JavaScript. The funniest line was when he said:

“Sometimes you get lucky in JavaScript, you always get lucky in C#”

Another feature that is coming in C# is what is called Caller Info Attributes. These are built-in attributes that you can add to parameters to a method to

receive the name of the caller file path, the caller line number and member name.

[CallerFilePath]

[CallerLineNumber]

[Caller/MemberName]

This is very nice for logging code.

Roslyn Project

Towards the end of the session Anders talked about what’s coming in C# 6.0 and a project named “The Roslyn project.” The basics of this project are:

Reimagine what compilers do

Compiler as a service

Open the compiler, make its information available to others (formatters, highlighters, refactoring, DSL)

With feature the syntax tree produced by the C# compiler becomes available to other tools so that they can peek inside the code with a true semantic knowledge of what the code does.

Anders shows a C# interactive prompt in which he was able to create a C# program on the fly, line by line, and execute each line as it went. This is nothing new to people that use JavaScript or Ruby but for a static language like C# this is huge! I was really impress on how clean the syntax to do this was.

The following picture (blurry) shows an example of what he did. In this code he declares a square function in a string and executes is in the program via a delegate. Wicked stuff.

Another example of using Roslyn that we showed was a feature to paste C# code as VB.NET code and vice-versa. This showed how the semantic of the original code was preserved.