![]() |
| Convert string to int |
|
eriweb
|
Hello all,
I am trying to convert a string to an int in C# and am running to a small issue. Let's say I have a string that has a value of "0832" and when I convert it using Convert.ToInto32("0832") I get back an int with a value of 832, but I am trying to get the whole thing 0832. Does any know any other convert methods that can accomplish this? Thanks. |
||||||||||||
|
|
|||||||||||||
|
bobum
Elvis Fanatic
![]()
|
0832 IS 832 as an integer - you can't get a zero in the front there if you want it to be an integer - the only way you can evaluate that is to have it be a string.
|
||||||||||||
|
|
|||||||||||||
| Convert string to int |
|
||
|



