1

I have a function that takes 3 parameters, username(string), password(string) and an ID(Int32) for that i have just passed the parameter like this

newresult.dataSet = postCommands.getCustomerBalance("customer1","password1234", "02070481");

but the parameter that takes the ID(Int32) takes only the 2070481 after the first 0 from the value passed. enter image description here

I just want to know why it is happening and where that Zero (0) have gone ??? what i can do to get the complete value that i have passed as parameter ???

4

1 回答 1

2

Because it's an integer. Integers don't have "leading zeros". A string formatted from an integer would.

I'd suggest if you need the leading zero, then just format it where you need it displayed like that.

于 2014-10-07T11:04:53.930 回答