In fact, the essential difference is to look at function features: the features of the two override functions are the same, while the names of the two overload functions are the same, function features are different.
Function features include the function name, parameter type, and number.
Override is inherited. If the function you write is the same as the feature of the function to be inherited, add this keyword, when this function of this subclass is used, the function of the parent class (or superclass) is invisible and overwritten.
For example, derived inherits the base, which contains void a (int)
If you think that A is not well written or suitable for this class in derived, you want to re-writeCodeThen override void a (int A) is written, and the original function is overwritten by the new one.
Overload is a heavy load, that is, the function name is the same, and the function features are different, the system will adjust the corresponding function according to the parameters you provide.
For example: void a (int A) and void a (int A, int B)
If you use a (1), the first one is called. If it is a (), the second one is called.
[Name: override and overload] [tags:. Net]
[From alphawu. Blog]