Skip to content

QRCode' does not contain a definition for 'GetGraphic' and no accessible extension method 'GetGraphic' accepting a first argument of type 'QRCode' could be found  #441

Open
@ANKUSH-032

Description

@ANKUSH-032

I am trying to generate QRCode in .Net 6 but get a error Tell me where is my code wrong

QRCodeGenerator qrCodeGenerator = new();
string data = "Name : " + employeeSalaryGetDetails.Name + "\n DOB : " + employeeSalaryGetDetails.DayofBirth.ToString() + "\n Email Address : " + employeeSalaryGetDetails.EmailId.ToString();
QRCodeData qrCodeData = qrCodeGenerator.CreateQrCode(data, QRCodeGenerator.ECCLevel.Q);
QRCode qrCoder = new();
qrCoder.Equals(qrCodeData);
Image rqCodeImage = qrCoder.GetGraphic(20);

            var bytes = ImageToByteArray(rqCodeImage);
            return File(bytes, "image/tmp");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions