C#->X# for dummies
Posted: Wed Feb 03, 2021 1:20 pm
Hi Horst,
I searched for the library and found this, is this the one you are using? https://github.com/codebude/QRCoder
Indeed there's no "QrCode.SwissQrCode" class defined in it, that's why the compiler complains. But there's a nested class of class "QRCoder.PayloadGenerator" named "SwissQrCode", so in order to use it, you need the class name "PayloadGenerator.SwissQrCode", instead of just "SwissQrCode".
But even if I change the classnames in your code, I still get a couple different compiler errors, about wrong parameters used, so I suspect there's a mismatch between the sample and the library, the code is probably intended to be used with a different version of the library.
Where did you get the sample and library from?
I searched for the library and found this, is this the one you are using? https://github.com/codebude/QRCoder
Indeed there's no "QrCode.SwissQrCode" class defined in it, that's why the compiler complains. But there's a nested class of class "QRCoder.PayloadGenerator" named "SwissQrCode", so in order to use it, you need the class name "PayloadGenerator.SwissQrCode", instead of just "SwissQrCode".
But even if I change the classnames in your code, I still get a couple different compiler errors, about wrong parameters used, so I suspect there's a mismatch between the sample and the library, the code is probably intended to be used with a different version of the library.
Where did you get the sample and library from?