Monthly Archives: July 2012

Windows 8 SDK Customer Satisfaction Survey

Windows 8 introduces a number of innovations in the way information is delivered to developers. Microsoft would like to know how well these are working for you, and where they can make further changes to improve your experience.

To review the site before you complete the survey, visit the Windows 8 Dev Center. In particular, have a look at the section called Learn to build Metro style apps.

A few questions in the survey are about about how the Windows 8 site experience compares to the iOS and Android sites. If you aren’t an experienced iOS or Android developer, feel free to skip these parts. But, if you’ve made apps for those platforms, or if you’d like to compare site features based on just a browse through those sites, Microsoft would like to hear your opinion.

The survey will be available here until July 27, 2012.

Breaking Changes In Argument List Evaluation In C# 5.0

The C# Language Specification states on § that “(…) the expressions or variable references of an argument list are evaluated in order, from left to right (…)”.

So, when this code is compiled with the C# 4.0 compiler:

static void M(
    int x = 10,
    int y = 20,
    int z = 30)
        "x={0}, y={1}, z={2}", x, y, z);

static void Main(string[] args)
    int a = 0;

    M(++a, z: ++a);

and run, this unexpected output is obtained:

x=2, y=20, z=1

In fact, fixing this compiler flaw was the cause of one of the few breaking changes introduced in C# 5.0.

Using the 5.0 compiler, the expected result is obtained:

x=1, y=20, z=2

To avoid this type of surprises, expression evaluation should be avoided in argument lists.

With this code:

int a = 0;

int i = ++a;
int j = ++a;

M(i, z: j);

the same result is obtained for both C# 4.0 and C# 5.0:

x=1, y=20, z=2

How To: Make XAML Content Globalizable When Using Value Converters

(This content was written based on Silverlight for Windows Phone, but might be valid for generic Silverlight.)

There are a many articles on MSDN (and all over the Internet) about globalization and localization of Silverlight applications in general and specifically Windows Phone 7 applications but I haven’t found any that uses a value converter.

Continue reading