You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: QRCoder/Assets/nuget-readme.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,12 @@ The release notes for the current and all past releases can be read here: [📄
19
19
You only need a couple lines of code, to generate your first QR code.
20
20
21
21
```csharp
22
-
QRCodeGeneratorqrGenerator=newQRCodeGenerator();
23
-
QRCodeDataqrCodeData=qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q);
24
-
QRCodeqrCode=newPngByteQRCode(qrCodeData);
25
-
byte[] qrCodeImage=qrCode.GetGraphic(20);
22
+
using (QRCodeGeneratorqrGenerator=newQRCodeGenerator())
23
+
using (QRCodeDataqrCodeData=qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q))
24
+
using (PngByteQRCodeqrCode=newPngByteQRCode(qrCodeData))
25
+
{
26
+
byte[] qrCodeImage=qrCode.GetGraphic(20);
27
+
}
26
28
```
27
29
28
30
There are a plenty of other options. So feel free to read more on that in our wiki: [Wiki: How to use QRCoder](https://github.com/codebude/QRCoder/wiki/How-to-use-QRCoder)
Copy file name to clipboardExpand all lines: readme.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -43,10 +43,12 @@ _(More information on how to use Github Packages in Nuget Package Manager can be
43
43
You only need a couple lines of code, to generate your first QR code.
44
44
45
45
```csharp
46
-
QRCodeGeneratorqrGenerator=newQRCodeGenerator();
47
-
QRCodeDataqrCodeData=qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q);
48
-
QRCodeqrCode=newPngByteQRCode(qrCodeData);
49
-
byte[] qrCodeImage=qrCode.GetGraphic(20);
46
+
using (QRCodeGeneratorqrGenerator=newQRCodeGenerator())
47
+
using (QRCodeDataqrCodeData=qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q))
48
+
using (PngByteQRCodeqrCode=newPngByteQRCode(qrCodeData))
49
+
{
50
+
byte[] qrCodeImage=qrCode.GetGraphic(20);
51
+
}
50
52
```
51
53
52
54
There are a plenty of other options. So feel free to read more on that in our wiki: [Wiki: How to use QRCoder](https://github.com/codebude/QRCoder/wiki/How-to-use-QRCoder)
0 commit comments