Extension method: Difference between revisions

Content deleted Content added
No edit summary
Line 11:
 
As an example, consider a need of extending the string class with a new reverse method whose return value is a string with the characters in reversed order. Because the string class is a primitivesealed type, the method would typically be added to a new [[utility class]] in a manner similar to the following:
<source lang="csharp">
string x = "some string value";