Extension Method:-
Extension Method is a Static method of Static class where the "this" modifier is applied to the first
parameter . The type of first parameter will be the type of Extended method.
Benefits of Extended method:
1. Extension method allow existing class to be extended without relying on inheritance.
or having change the class source code.
2. If the class is sealed than there in no concept of extending its functionality. For this a new concept is introduced, in other words extension methods.
Extension Method is a Static method of Static class where the "this" modifier is applied to the first
parameter . The type of first parameter will be the type of Extended method.
Benefits of Extended method:
1. Extension method allow existing class to be extended without relying on inheritance.
or having change the class source code.
2. If the class is sealed than there in no concept of extending its functionality. For this a new concept is introduced, in other words extension methods.
No comments:
Post a Comment