<p>If I have a string (010) and i want to add 1 to it (011) what value type should i use to convert this string into a number for adding and at the same time preserve the whole number and not 10 + 1 = 11. </p>

```
```
if (int.TryParse(str, out i))
    str = (i + 1).ToString("000");
```
```
HTH.
(
edit
: fixed the problems pointed out by BoltBait and steffenj)