0
I’m making a conversion of a value int
:
int.Parse(detalhe.GANO_ID_ATIV.ToString())
But you’re giving me a mistake
A cadeia de caracteres de entrada não estava em um formato correto.
What could be causing?
0
I’m making a conversion of a value int
:
int.Parse(detalhe.GANO_ID_ATIV.ToString())
But you’re giving me a mistake
A cadeia de caracteres de entrada não estava em um formato correto.
What could be causing?
Browser other questions tagged c# asp.net
You are not signed in. Login or sign up in order to post.
And what is the content of
detalhe.GANO_ID_ATIV
– Leandro Angelo
is coming null...
– Stand Alone
@Arthurmoraes, apart from the answers of other questions. If in the case this property of the object have the possibility to come number or
null
, makes it interesting to useConvert.ToInt32(detalhe.GANO_ID_ATIV.ToString())
, because he treats situations comingnull
returning as0
, soon theint.Parse
he falls inexception
in such cases. (Only a summary of what to use according to your programming rule)– Daniel Nicodemos
no friend, kept giving the same error.... neither with int.Parse nor with Convert.Toint32
– Stand Alone