( Following the first session...)
g) Extension Method
Declaration: Use "this" keyword before the first parameter of a method. Then the first parameter will represent the type of a data that you may want to use. And its behavaior looks like a instance of a particular object instance.
Code like below:
Others about extension: Extension method is enable the developer to extend a class which can not be modified. Or a develop was isolate for the source code.
h) Partial Method
(1) Partial Method can be only defined or implemented in partial class.
(2) Must use keyword "partial" to sepecify a partial method.
(3) Partial Method is private, but you cannot use private to modify your method, otherwise a compile error will be generated.
(4) Partial Method must return void type.
(5) Partial Method can be a declaration without being implemented.
(6) Partial Method can be a static method.
(7) Can take some parameters.
A simple demo like below, and please get the output result?
( Continuie tomorrow... )
( Good evening! )