c#中QRCodeVersion = 0但还是提示“索引超出了数组界限”怎么破?
VS2013里面用QRCode做一个生成二维码的工具,老是提示“索引超出了数组界限”,把QRCodeVersion=0还是一样,怎么破?下面是代码。privatevoid...
VS2013里面用QRCode做一个生成二维码的工具,老是提示“索引超出了数组界限”,把QRCodeVersion = 0还是一样,怎么破?下面是代码。
private void buttonSC_Click(object sender, EventArgs e)
{
pictureBoxEWM.Image = GetDimensionalCode("abc");
}
private Bitmap GetDimensionalCode(string nr)
{
QRCodeEncoder RqCE = new QRCodeEncoder();
RqCE.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
RqCE.QRCodeScale = 4;
RqCE.QRCodeVersion = 0;
RqCE.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
Bitmap bmp = RqCE.Encode(nr);
return bmp;
} 展开
private void buttonSC_Click(object sender, EventArgs e)
{
pictureBoxEWM.Image = GetDimensionalCode("abc");
}
private Bitmap GetDimensionalCode(string nr)
{
QRCodeEncoder RqCE = new QRCodeEncoder();
RqCE.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE;
RqCE.QRCodeScale = 4;
RqCE.QRCodeVersion = 0;
RqCE.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M;
Bitmap bmp = RqCE.Encode(nr);
return bmp;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询