X++ byref for .Net reference and out method parameters
Since we are on the topic if integrations for our current post threads, I thought I would point out something very interesting.
In Dynamics AX 4.0 and before, if you had a .Net assembly or some of the COM or API call that made use of reference or our method parameters, you would have to wrap this integration in .Net 2.0 and expose such methods through much simplier calls with normal method parameters that are sent in.
In Dynamics AX 2009, the byref keyword was added, so that you do not have to do this anymore. You can now make calls to such methods that make use of reference or out method parameters.
You can find more about this here.: How to: Use the byref Keyword for CLR Interop
I myself have had to create such .Net wrappers around integration points that made such use of reference or out method parameters. Now that layer can go away with Dynamics AX 2009.
This opens up a good path of possibilities, and takes away a layer of abstraction that only existed because of X++ limits.
Well that's all for now, check back soon!
"Visit the Dynamics AX Community Page today!"
In Dynamics AX 4.0 and before, if you had a .Net assembly or some of the COM or API call that made use of reference or our method parameters, you would have to wrap this integration in .Net 2.0 and expose such methods through much simplier calls with normal method parameters that are sent in.
In Dynamics AX 2009, the byref keyword was added, so that you do not have to do this anymore. You can now make calls to such methods that make use of reference or out method parameters.
You can find more about this here.: How to: Use the byref Keyword for CLR Interop
I myself have had to create such .Net wrappers around integration points that made such use of reference or out method parameters. Now that layer can go away with Dynamics AX 2009.
This opens up a good path of possibilities, and takes away a layer of abstraction that only existed because of X++ limits.
Well that's all for now, check back soon!
"Visit the Dynamics AX Community Page today!"
Labels: Byref, Dynamics AX 2009, Out Method Parameters, Reference Method Parameters, X++, Xpp
1 Comments:
You should be aware of the fact that there is a bug when using the keyword ByRef. This does not work if called on the server tier.
Post a Comment
<< Home