what is the reason /logic/obstacle behind the fact that partial methods can only have void return type?
thanks
Partial methods are designed to be left out if you did not provide an implementation for them. The compiler actually removes calls to partial methods that are not implemented.
This also highlights why they cannot return anything: If you relied on a return value without implementing the partial method, then what? You'd have something uninitialised, despite the code clearly showing an assignment.
Similarly, methods that use the Conditional attribute can only return void
for the same reason. The method call may or may not exist in the compiled IL.