.NET optional argument - C/AL interoperability

Hi,

I was using a third party (http://www.nudoq.org/#!/Packages/SSH.NET/Renci.SshNet/SftpClient) which I successfully consumed in .NET. However I want to use this functionality in Dynamics NAV 2016, so I tried to translate the C# code into C/AL, only to be stopped by the UploadFile method invocation.

UploadFile(Stream, String, Action<UInt64>)

In .NET, the third parameter is marked as optional - with the [] brackets - so I did not have to include it. However, when I do the same in NAV, I get the error There is no overload for method 'UploadFile' that takes '2' arguments.

My question is how do I create an Action parameter to stop the error from occurring? Or at least, what is the .NET null equivalence in C/AL?

Thanks in advance,
Mark

Answers

  • yukonyukon Member Posts: 361
    Hi,

    I think some of parameter cannot directly apply from C/AL. I used my own DLL and refer the sshnet. After that i call my .net dll from C/AL.

    Regards,
    Make Simple & Easy
Sign In or Register to comment.