The CLR for X++ programmers

The CLR for X++ programmers

  • Comments 4

Dynamics Ax offers since Ax4 a .Net support (BC.Net, EP and CLR objects with X++). As a matter of fact .Net will have a more and more important influence on Dynamics Ax since .Net is the glue of the Microsoft product stack. Sharepoint, BizTalk, SQL Server, Analysis Services, Microsoft Project, Workflow Foundation, … all these products are already communicating with Dynamics Ax due to .Net. So having basic .Net skills is important for you as a Dynamics Ax expert.

Based on problems that partners reported in the last months, I’m going to blog the next weeks about the differences between the Dynamics Ax and the CLR and C#. I hope this might help you to avoid typical errors…

Here are the topics that I will treat in these blogs:

1. The garbage collector in X++ and the CLR

2. Exception handling in .Net and X++

3. Some important things for a X++ developer to know when writing C# code

4. Architecture of applications using the BC.Net

Please send me your comments or suggestions. Perhaps you might have questions that you did not get answered so far. Thank you for any mail/comment!

Leave a Comment
  • Please add 5 and 7 and type the answer here:
  • Post
  • Florian,

    I send you my AX wrapper, to my opinion it should take care with these points

    http://axstart.spaces.live.com/blog/cns!E82F2C8CB173C0A0!364.entry

  • Hello Wenni,

    I'm currently on a training and I'll be back next week. I'll have a look at it on Monday.

    Cheers,

    Florian

  • Dynamics Ax offers since Ax4 a .Net support ( BC.Net, EP and CLR objects with X++ ). As a matter of fact

  • Hi Wenni,

    You shouldn't have any 'memory'-leaks with your code:

    - You're providing an explicit method to release unmanaged resources.

    - You implemented a way that if the resources haven't been released until the object is finalized, this will by done by the GC.

    What you are missing in you're code is to signakize the GC that the Finalize has already been done and that all this Finalization-overhead by the GC shouldn't be done any more. This is normaly done with the follwowing instruction and is part od the Dispose-pattern:

    8:      public void Dispose()  

    9:      {  

    10:          Dispose(true);  

    11:          GC.SuppressFinalize(this);  

    12:      }

    Line 11 prevents that the object will be passed in the Finalize-heap and consume quite a lmot of resources- for nothing.

Page 1 of 1 (4 items)