Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

.NET optional argument - C/AL interoperability

$
0
0
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

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>