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


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: 2008-05-13 9:13:21 AM
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: 2008-05-13 7:38:16 AM
Is this new feature in .net 3 ?

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

©Copyright 1998-2024  |  Page Processed at 2024-04-15 6:23:57 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search