Click here to Skip to main content
15,894,095 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have error in this line

ean13.Code = BarcodeEAN.GetBarsEAN13(row.Cells[12].Value.ToString(), false, BarcodeEAN.EAN13);


Severity	Code	Description	Project	File	Line	Suppression State
Error	CS1501	No overload for method 'GetBarsEAN13' takes 3 arguments	BSS	C:\Users\GB\source\repos\BSS\BSS\7101_Proizvodni_Proces_Pregled.cs	5317	Active


What I have tried:

  BarcodeEAN ean13 = new BarcodeEAN();
 ean13.CodeType = Barcode.EAN13;
 ean13.ChecksumText = true;
 ean13.GenerateChecksum = true;
 ean13.Code = BarcodeEAN.GetBarsEAN13(row.Cells[12].Value.ToString(), false, // error BarcodeEAN.EAN13);
System.Drawing.Bitmap bm = new system.Drawing.Bitmap(ean13.CreateDrawingImage(System.Drawing.Color.Black, System.Drawing.Color.White));
Posted
Updated 5-Nov-20 0:40am

The error message is pretty self-explanatory: whatever library you're using, the GetBarsEAN13 method doesn't take three parameters.

You can't pass more or fewer parameters than the method is expecting.

Change your calling code to pass the correct parameters.
 
Share this answer
 
Comments
Goran Bibic 5-Nov-20 8:41am    
I try this

BarcodeEAN ean13 = new BarcodeEAN();
ean13.CodeType = Barcode.EAN13;
ean13.ChecksumText = true;
ean13.GenerateChecksum = true;
ean13.Code = Convert.ToString(BarcodeEAN.GetBarsEAN13(row.Cells[12].Value.ToString()));
System.Drawing.Bitmap bm = new System.Drawing.Bitmap(ean13.CreateDrawingImage(System.Drawing.Color.Black, System.Drawing.Color.White));


Error: Index was outside the bounds of the array
Richard Deeming 5-Nov-20 9:17am    
Well, what do you think that error message means?

Hint: Check that your row contains at least 13 cells.
 
Share this answer
 
Comments
Goran Bibic 5-Nov-20 8:41am    
I try this

BarcodeEAN ean13 = new BarcodeEAN();
ean13.CodeType = Barcode.EAN13;
ean13.ChecksumText = true;
ean13.GenerateChecksum = true;
ean13.Code = Convert.ToString(BarcodeEAN.GetBarsEAN13(row.Cells[12].Value.ToString()));
System.Drawing.Bitmap bm = new System.Drawing.Bitmap(ean13.CreateDrawingImage(System.Drawing.Color.Black, System.Drawing.Color.White));


Error: Index was outside the bounds of the array
Richard MacCutchan 5-Nov-20 9:24am    
"Error: Index was outside the bounds of the array"
So which index is that referring to?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900