jalalm
1
hello all
i I wrote a dll in VS2010 that change Gregorian date to persian date . I want to add it to Dynamics AX and use it in my forms and report
i know know how to add my dll in reference library (in AOT > reference > browse a file … ) but how call and use my dll method.
thanks
You can use directly in X++ thanks to CLR Interop (aka .NET Interop) to X++.
Two examples using standard .NET classes:
// Constructor and instance method call
System.Random rnd = new System.Random();
;
rnd.Next();
// Static method call
System.Math::Cos(0);
As you can see, you have to use full type names. The library must be also built for right version of .NET, the type/method must be public etc.
jalalm
3
thanks Martin for guidance but i want to use external dll method
What do you mean? Isn’t mscorlib.dll (where both System.String and System.Random are defined) external enough? 
Obviously I can’t give you an example using your own code, so I used other .NET types.
jalalm
5
Martin:
i purpose use Data/Dynamic link library (DLL) or COMPONENT that made for developer and customize application program.
for example DevExpress components or janus component .net
DLL may contain almost anything, it’s almost the same as to say “some compiled code”. Component is even more generic term.
From your examples I think you want to use some WinForms controls, it that correct? What version of AX do you use?