‘is’ and ‘as’ operators with .NET types
I recently ran into an unfortunate limitation of .NET Interop from X++ (in D365FO). I wanted to check if an X++ object is of a given type, nevertheless the type used for the variable declaration was a .NET interface. Here is an example: using Microsoft.Dynamics.ApplicationSuite.FinancialManagement.Currency.Framework; void demo(IExchangeRateProvider _provider) { if (_provider is ExchangeRateProviderCBOE) {} …
Continue reading ‘‘is’ and ‘as’ operators with .NET types’ »