I have a method that receives an integer that can be null
, in case some method executions happen, but when I use this same variable in a place that uses int
that can not be null, it appears that the overload
is incorrect.
So I would like to know how I can do this conversion, is there any method that does this as ToString
?
Code with problem
public HttpResponseMessage Metodo(int? variavel = chamadademetodo.metodo {
if (variavel == null) {
...
}
var bla2= blablabla.metodo(variavel, DataContext); //aqui acusa problema
}