Event Interoperability with WinRT

Starting with .NET Framework 4.5, managed code developers can target the new Windows APIs, collectively known as the Windows Runtime (WinRT), directly from their favorite managed languages. To make this work, both the CLR and the language compilers had to be tweaked to provide smooth interoperability between the two worlds.

Although WinRT components share the same metadata format as assemblies used in the .NET Framework, things differ a bit in a few places. One such place is where WinRT events are defined. Although the metadata format is the same, the use of it differs subtly. Let’s take a look.

As described earlier, .NET events are defined as a piece of metadata that ties together two methods: one that’s responsible ...

The best content for your career. Discover unlimited learning
on demand for around $1/day.