Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Is it possible to use CIL of AX classes to create AX in C# without using reflection?

(0) ShareShare
ReportReport
Posted on by

I am working on the task where I am moving a lot of variables (100 000+) from C# to AX. Everything I tried yet fail on performance. (Calling C# in X++, Receiving C# array in X++, calling static method in C# trought recursion, Creating X++ object in C# trough reflection - business connector, receiving string from C# and parsing it in X++, receiving string and parsing it in X++ using C# call) 

I need to find some trick how to fast transfer those variables or how to make some X++ data-storing object in C# 

One thing that comes to my mind is creating X++ object directly in C# suing CIL call in C#. Did anyone tried this? Will it be fast?

It should be possible the classes in AX are translated to CIL and http://stackoverflow.com/questions/3328901/how-to-insert-cil-code-to-c-sharp 

*This post is locked for comments

  • Verified answer
    Martin Dráb Profile Picture
    233,498 Most Valuable Professional on at
    RE: Is it possible to use CIL of AX classes to create AX in C# without using reflection?

    I already gave you the answer in your previous thread. Don't run your X++ code directly; generate CIL from it and run the logic in CIL. Then the whole solution will run in CLR (without switching between AX runtime and CLR) and CLR types will be called directly. For CLR, CIL generated from X++ and CIL generated from C# are indistinguishable.

    Haven't you ever heard of the out-of-the-box feature in AX 2012 generating CIL from X++?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans