You can use the String.TrimStart
method:
string num = "0001";
num = num.TrimStart('0');
3
solved c# deleting the 0s of an int, but not if it is 20 [duplicate]
You can use the String.TrimStart
method:
string num = "0001";
num = num.TrimStart('0');
3
solved c# deleting the 0s of an int, but not if it is 20 [duplicate]