I'm having trouble converting data from a database, for example I'm running a query like this:
carteira ca = bc.carteira.FirstOrDefault(obj => obj.cpf == cepf && obj.codigo == cod);
I get data information of type ca.valor
, ca.inicio
, ...
I would like to know how to convert this value to a type like int, double, ...
In order to make the following additions:
int result;
double soma;
int x = ca.valor + result;
double y = ca.inicio + soma;
And so I can use them in a method of my project
chama.meuMetodo(x,y); // x e y seriam int e double
I confess that I forgot how to do this conversion and your Google is not helping.