Extension method: Difference between revisions

Content deleted Content added
No edit summary
Line 36:
}
</source>
 
The major difference between extension methods and normal, static helper methods is that static methods calls are [[Polish_notation|prefix notation]], whereas extension methods calls are in [[Infix_notation|infix notation]]. This leads to more readable code when the result of one operation is used for another operation.
 
With static methods: "HelperClass.Operation2(HelperClass.Operation1(x, arg1), arg2)"
 
With extension methods: "x.Operation1(arg1).Operation2(arg2)"
 
==See also==