Useful Extension Methods
page 4 of 4
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 23311/ 70

Conclusion

Extension methods are very powerful; they can help you move code outside of automatically generated code, so you don't have to do any extra maintenance work there.  They also can attach methods to objects that are sealed or not-inheritable in VB.NET. But one of the more important facts is that they can reduce the amount of code and create reusable logic that is simpler to execute.

Extension methods, used wisely, can be a very powerful thing, and can add a huge convenience for an application.  It also encapsulates code and can assist with code reuse by placing it in the static class where it can be reused for every instance of the extended type.


View Entire Article

User Comments

Title: RE: Please specify the framework version   
Name: Brendan Enrick
Date: 5/13/2008 9:13:21 AM
Comment:
Yes, extension methods were added in C# 3.0, so this is a new feature.
Title: Please specify the framework version   
Name: Vijil Jones
Date: 5/13/2008 7:38:16 AM
Comment:
Is this new feature in .net 3 ?






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2014 ASPAlliance.com  |  Page Processed at 8/1/2014 1:45:47 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search