kwh3856
asked on
How do you pluck a character from a string value in C#?
I am trying to manipulate a string value called Zip. I want to be able to pull any digit of the zip and perform a caculation on it. For example. If the Zip had a value of 55522 and I wanted to add 8 to the third digit what what be the command to pull this digit out of the string. I know it can be done with the string command in vb but I do not know the syntax in c#.
Any help is greatly appreciated.
Any help is greatly appreciated.
you could just use regular expression to substitute or substring...I will give examples...
but since string class is immutable, the best way to do this would be to use the stringbuilder class...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just in case,
The StringBuilder library is at System.Text.StringBuilder. ..
The StringBuilder library is at System.Text.StringBuilder.
ASKER
Thank you very much!!