Extension method: Difference between revisions

Content deleted Content added
Kyralessa (talk | contribs)
I see your point, but (a) this isn't a "how to"; (b) I think the amount of code is reasonable (see e.g. the C# article); (c) if you disagree, let's *discuss on the talk page*.
Extension methods: syntax highlighting
Line 39:
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: <source lang="csharp">HelperClass.Operation2(HelperClass.Operation1(x, arg1), arg2)"</source>
 
;With extension methods: <source lang="csharp">x.Operation1(arg1).Operation2(arg2)"</source>
 
==The versioning problem==