Recently we noticed that there now is a NuGet package for PCANBasic .NET.
However I cannot find a simple demo program how to use it. All the examples still use the pcanbasic.cs and not the NuGet package.
The Introduction pages tell a lot but not much how to get started: https://docs.peak-system.com/API/PCAN-B ... 6f22a0.htm
Whatever I try to do it always seems to include immediately the Peak.Can.Basic.BackwardCompatibility namespace.
So is there any info/demo how to use actually the new way? Even how to Initialize is not clear.
Kind regards,
Erik Schuurman
DIS Sensors B.V.
Peak.PCANBasic.NET NuGet package
Re: Peak.PCANBasic.NET NuGet package
Hello,
there is indeed no demo using the assembly, but you can see a lot of code within the online documentation:
https://docs.peak-system.com/API/PCAN-Basic.Net/
Mainly, you have a better version of the PCANBasic class called just "Api", a PCANBasic class as backward compatibility option, and the new Worker class. Each class and their methods have examples in C#, VB.NET, and C++/CLI. For starting working with the package, it is recommended to first read the How-Tos and Q&As chapter (the link is in the picture you posted). You find in there questions like: Then you can just check any class or method for code samples, like this:
there is indeed no demo using the assembly, but you can see a lot of code within the online documentation:
https://docs.peak-system.com/API/PCAN-Basic.Net/
Mainly, you have a better version of the PCANBasic class called just "Api", a PCANBasic class as backward compatibility option, and the new Worker class. Each class and their methods have examples in C#, VB.NET, and C++/CLI. For starting working with the package, it is recommended to first read the How-Tos and Q&As chapter (the link is in the picture you posted). You find in there questions like: Then you can just check any class or method for code samples, like this:
Best regards,
Keneth
Keneth
Re: Peak.PCANBasic.NET NuGet package
Thanks for the info, in the meantime I already found some parts of demo code indeed.
For now I was just curious for the new worker class, that seems to simplify things. We'll leave the existing code using the backward compatibility. I needed a small test/debug utility and thought that would be a good reason to test the new way
Regards,
Erik
For now I was just curious for the new worker class, that seems to simplify things. We'll leave the existing code using the backward compatibility. I needed a small test/debug utility and thought that would be a good reason to test the new way

Regards,
Erik