CsWinRT
CsWinRT copied to clipboard
Authored component doesn't have expected System.DateTime to Foundation.DateTime type mapping
I authored a component in C#/WinRT. It has a class which exposes a .NET DateTime property.
When I went to consume that component from C++/WinRT, it didn't work. C++ complained that it couldn't find the System.DateTime type.
My expectation was that DateTime would be mapped to a Windows::Foundation::DateTime and therefore usable from C++/WinRT.
authoring bug?
We do have a diagnostics issue here where if System.DateTime
is used, we should say it isn't a valid WinRT type. @Psychlist1972 instead of System.DateTime
, can you use System.DateTimeOffset
? System.DateTimeOffset
is the .NET type which gets mapped to the WinRT type Windows.Foundation.DateTime
.