http://channel9.msdn.com/Events/BUILD/BUILD2011/BPS-1004
It shows just how much attention to detail Microsoft has put into the UX design of Metro and Windows 8. Can't wait to see the finished product.
11–20 of 48 posts
http://channel9.msdn.com/Events/BUILD/BUILD2011/BPS-1004
It shows just how much attention to detail Microsoft has put into the UX design of Metro and Windows 8. Can't wait to see the finished product.
Does anyone know if it will have a Sound API? .NET still doesn't. Neither does it have usable Direct{3D,Sound,X} binding.
Earlier quoted context omitted.
Um, it sounds like 'mobile' is driving the industry. Apple is a player too, just like everybody else.
Don't forget that Apple invented the new 'mobile' as we now know it - hardware, UX, app store etc. Everybody else is following.
Does anyone know if it will have a Sound API? .NET still doesn't. Neither does it have usable Direct{3D,Sound,X} binding.
public sealed class AddTwo {
public int Add (int a, int b)
{
return a + b;
}
public async IAsyncOperation SubAsync (int a, int b)
{
return a - await (CountEveryBitByHand (b));
}
}
Sorry for being an idiot here, but.. does this example make any sense to anyone else? There's a method that adds two numbers, but the async operation is SubAsync which subtracts something passed through CountEveryBitByHand from a... passed through something called await? Is this obvious to other people? Does he mean that any sealed class automatically becomes a component, so the AddTwo part is just the Add method? What does "a component that adds 2" mean anyway?Is it a joke and I'm not getting it?
The following is the full source code for a component that adds 2: public sealed class AddTwo { public int Add (int a, int b) { return a + b; } public async IAsyncOperation SubAsync (int a, int b) { return a - await (CountEveryBitByHand (b)); } } Sorry for being an idiot here, but.. does this example make any sense to anyone else? There's a method that adds two numbers, but the async operation is SubAsync which subtr…
To keep it simple they should have left out the second method.
Unless I'm incredibly wrong!
The following is the full source code for a component that adds 2: public sealed class AddTwo { public int Add (int a, int b) { return a + b; } public async IAsyncOperation SubAsync (int a, int b) { return a - await (CountEveryBitByHand (b)); } } Sorry for being an idiot here, but.. does this example make any sense to anyone else? There's a method that adds two numbers, but the async operation is SubAsync which subtr…
I suspect that code is contained in a class library project. Aka, generates a DLL. So no, not all sealed classes will be components.
The second method is there to illustrate what asynchronous programming will look like in C# 5. Native support for async is THE big feature in C# 5. The "await" allows you to call slow blocking code without a thorny nest of callbacks. There's some magic behind await. You can find out more on Google. Miguel could've definitely left out the SubAsync method in this example for clarity.
A component that adds 2 means a DLL that exposes the methods Add and SubAsync. In WinRT, you can code libraries in C# and use them in C++. Or Javascript.
The following is the full source code for a component that adds 2: public sealed class AddTwo { public int Add (int a, int b) { return a + b; } public async IAsyncOperation SubAsync (int a, int b) { return a - await (CountEveryBitByHand (b)); } } Sorry for being an idiot here, but.. does this example make any sense to anyone else? There's a method that adds two numbers, but the async operation is SubAsync which subtr…
The await keyword is a new one in C# 5 which halts execution until the promise is fulfilled. Then execution is resumed from that point, and the expression can be evaluated and the function returns.
It's similar to how inlineCallbacks in Twisted work, if you're familiar with those.
When you use C# and VB, you are using the full .NET framework. But they have chosen to expose a smaller subset of the API to developers to push the new vision for Windows 8. For me, this is a really interesting point that this article doesn't fully get. When you use WinRT you might be using the C# compiler, CLR runtime and .NET string & collection classes, but there are huge sections of the .NET BCL that now look lik…
My suspicion is that .NET 5 will merge the two.