Why does the following Desktop UWP (or WinUI or WinRT? I get confused by the terminology) code compile but throw an exception?