optional/null-able OUT parameter in C# -
i have method has several overrides. in 1 of more expanded overrides, want return out parameter not in simpler overrides. example:
public bool ispossible(string param1, int param2) public bool ispossible(string param1, int param2, out bool param3)
the way achieving this, so:
public bool ispossible(string param1, int param2) { bool temp; return ispossible(param1, param2, out temp); }
is there better way achieve this? can (or should i) use null-able out parameter?
that looks fine me. out
cannot optional technical reasons (it needs point valid instance).
Comments
Post a Comment