Suppose I have this method ...
private BigInteger Numero(string cadena)
{
if (CadenaConValor(cadena) != 0 && CadenaOk(cadena))
{
BigInteger n;
return n = BigInteger.Parse(cadena);
}
return 0;
}
Could in the return simplify the syntax to directly return the converted cadena
string, without having to create the variable n
in the previous line?
As I expose in the title, it also happens to me when I try to return objects which I have to instantiate before I can return them.