I study With #. And here I got to the topic "Partial methods". I read this topic 3 times, but I cannot understand what the book wants me to say. If you know, please reply with a simple explanation (as I doubt it), or with a sample code.

Just do not scold while testing with the console. Questions that touched me:

1) Partial methods may be static, but always private and cannot have a return value. Any parameters used in them cannot be out parameters, although they can be ref parameters. None of the following modifiers can be applied to them: virtual, abstract, override, new, sealed and extern

(why? should be based on something all of this).

2) why cannot partial methods have a return type?

(why always void?)

    1 answer 1

    Partial methods are commonly used by code generators. They are declared in the automatically generated part of the code and are called from there, and in the part of the code that is written manually, they can be implemented. If the method is not implemented, when compiled, its calls are automatically removed from the code. Accordingly, the signature of these methods should be such that their removal does not affect the code collection. Hence the limitations described.

    • Is it partial ?? omg why translate everything) - rasmisha