Not all Paths return a value : C# -
forgive me if basics, have following function
private reportoption getreportoptions(int id, datarow dr) { string reporttype = getvalue(dr, "report type"); if (reporttype == "single") { getsinglereportoptions(id, dr); } else { getmultiplereportoptions(id, dr); } } now both functions getsinglereportoptions , getmultiplereportoptions returning value of type reportoption.
still gives me error
not code paths return value
can tell me why? how should structure function or make change in 2 helper functions?
the method getreportoptions doesn't return results of either getsinglereportoptions or getmultiplereportoptions. calls methods , ignores return values. preface both method calls return method return results of methods.
Comments
Post a Comment