I have strings that look like “01”, “02”. Is there an easy way that I can change the string into a number, add 1 and then change it back to a string so that these strings now look like “02”, “03” etc. I’m not really good at C# as I just started and I have not had to get values before.
Share
To get from a string to an integer, you can youse
int.Parse():To get back into a string with a specific format you can use
string.Format():The latter should give “07” if I understand http://www.csharp-examples.net/string-format-int/ correctly.