How do you convert a string to a value and then back to a string again in C#?
Posted on 2008-09-29
I have a string variable called Zip and I need to add 1 to the zip code but the variable is a string and C# does not allow you to add values to string variables. Can someone show me the syntax on how to convert it to an integer so I can perform the addition and then convert it back to string again?
Here is my basic code:
OriginZip = tbOriginZip.Text;
Ozip1 = OriginZip + 1;