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 ???

Joker
  • 830
  • 2
  • 14
  • 30

1 Answers1

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.

hometoast
  • 11,522
  • 5
  • 41
  • 58