Skip to content

Commit

Permalink
change: syntax of "new"
Browse files Browse the repository at this point in the history
  • Loading branch information
mint73 committed Feb 1, 2024
1 parent 6f40b16 commit 7f672ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions suiran/GenerateQRCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ public static class GenerateQRCode
{
public static string GenerateQR(string input)
{
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeGenerator qrGenerator = new();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(input, QRCodeGenerator.ECCLevel.H);
PngByteQRCode qrCode = new PngByteQRCode(qrCodeData);
PngByteQRCode qrCode = new(qrCodeData);
var qrCodeImage = qrCode.GetGraphic(20);
var qrString = "data:image/png;base64," + Convert.ToBase64String(qrCodeImage.ToArray());
return qrString;
Expand Down

0 comments on commit 7f672ad

Please sign in to comment.