The Code After Return is Inaccessible

After the return operator, there should not be any more lines of code in the current block, because if there are Visual Studio will warn you that it has found a piece of code which is inaccessible:

In programming you can't have the return operator twice, one after the other, because executing the first one won't allow the execution of the second one. From time to time programmers joke by saying “write return; return; and let's go”, in order to explain that the program logic is lost.

results matching ""

    No results matching ""