I want to add 0 into barcode string ABC4DE. So the output looks like 0ABC4DE.
Here is my code.
string nZero = "0";
if (tbReadBarcode2.Text.Contains("rn"))
{
tbReadBarcode2.Text = tbReadBarcode2.Text.Replace("rn", nZero + "");
btnReadBarcode2.Background = Brushes.Green;
bool result = false;
With this code, the final barcode string looks like this ABC4DE0 instead of 0ABC4DE.
The “0” was added at behind instead in front.
Can anyone help?
0ABC4DE and not ABC4DE0
New contributor
1