Skip to main content

Posts

Showing posts from June, 2023

x++ great but sometimes weird and annoying ....

Preamble: This occurred running on Finance and Operations (Dynamics 365) - (Platform Update57) 7.0.6861.86 extension for Visual Studio. Historically the x++ langauge has not had great support for access modifiers. The original workings was, that all class members in a class were private, and could not be accessed, by code outside the class, unless ofcourse you made a (parm) method giving access to change or just get something. Methods could have access modifiers but they were seldom used and were always public, unless you explicitly wrote something else. Somewhere a long the lines in D365 x++ has evolved to be more c#-like and therefor you can now put access modifiers on you class members, so that if you declare a class member public, you do not actually need to write an access (parm) method. However, the x++ compiler has it's quirks it seems. Consider this class declaration: internal final class MOLSOPackingSlipFromReceivedTransitGoodsUpdater {      public Q