Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
DZone MVB

Links

Social

C# Extension Methods

One of new cool features that will be available in C# 3.0 are extension methods. Extension methods will allow us to extend existing classes with new functionality. In this example I will show you how to extend System.string with two methods that are very popular in PHP: nl2br() and md5().

 

NB! This blog is moved to gunnarpeipman.com

Click here to go to article

Comments

Christopher Steen said:

ASP.NET Detecting AJAX Requests in MonoRail [Via: Bill Pierce ] ASP.Net MVC Framework - Create your...

# November 18, 2007 1:42 AM

Christopher Steen said:

Link Listing - November 17, 2007

# November 18, 2007 1:43 AM

K Jacobson said:

Really looking forward to taking advantage of these in the new C# release, but I agree need to be careful not to overdue it.

# November 28, 2007 12:59 AM

Gunnar Peipman's ASP.NET blog said:

This blog entry is supposed to be the continuation for entry C# Extension Methods where I told what extension

# December 29, 2007 6:02 AM

???????????????????? ????????????: C#, ????????????, ????????????????????????????????, ????????, ????… « ???????? ???????????? ?????????????? said:

Pingback from  ???????????????????? ????????????: C#, ????????????, ????????????????????????????????, ????????, ????… « ???????? ???????????? ??????????????

# January 1, 2008 12:28 PM

Gunnar Peipman's ASP.NET blog said:

During one SharePoint migration project I had problem with document versions comments. I needed some

# April 5, 2008 3:25 AM

Community Blogs said:

During one SharePoint migration project I had problem with document versions comments. I needed some

# April 5, 2008 3:29 AM

Sheikhi Mahnaz said:

thanks for your example .

# April 27, 2008 8:20 AM

Gunnar Peipman's ASP.NET blog said:

I discovered once myself automatically writing redirects like this: Response.Redirect( "otherpage

# July 9, 2008 6:13 PM

Gunnar Peipman's ASP.NET blog said:

During one of my current projects I wrote some useful extension methods for DateTime class. I had to

# July 16, 2008 3:20 PM

C#: Extensions methods != Open classes at Mark Needham said:

Pingback from  C#: Extensions methods != Open classes at Mark Needham

# February 18, 2009 3:22 PM

DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

# July 14, 2009 8:48 AM

DotNetBurner - C# said:

DotNetBurner - burning hot .net content

# July 14, 2009 8:49 AM

PimpThisBlog.com said:

Thank you for submitting this cool story - Trackback from PimpThisBlog.com

# July 14, 2009 8:50 AM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# July 14, 2009 8:51 AM

WebDevVote.com said:

You are voted (great) - Trackback from WebDevVote.com

# July 14, 2009 8:54 AM

progg.ru said:

Thank you for submitting this cool story - Trackback from progg.ru

# July 14, 2009 8:56 AM

Weekly Link Post 102 « Rhonda Tipton’s WebLog said:

Pingback from  Weekly Link Post 102 « Rhonda Tipton’s WebLog

# July 19, 2009 8:51 PM

Weekly Link Post 102 « Rhonda Tipton’s WebLog said:

Pingback from  Weekly Link Post 102 « Rhonda Tipton’s WebLog

# July 19, 2009 8:52 PM

Weekly Link Post 102 « Rhonda Tipton’s WebLog said:

Pingback from  Weekly Link Post 102 « Rhonda Tipton’s WebLog

# July 19, 2009 8:52 PM

Huynh Ngoc Bang said:

How to decoding MD5 when use it.

# January 7, 2011 11:46 AM

DigiMortal said:

MD5 is one way algorithm and you cannot decode it.

# January 24, 2011 8:05 AM

Extension methods – how they look like after compiling | Gunnar Peipman - Programming Blog said:

Pingback from  Extension methods – how they look like after compiling   | Gunnar Peipman -  Programming Blog

# May 6, 2013 4:50 PM

Métodos de extensión en .NET « EduardoOrtega.me() said:

Pingback from  Métodos de extensión en .NET «  EduardoOrtega.me()

# May 14, 2013 8:53 PM

Response.Redirect and Response.End | Gunnar Peipman - Programming Blog said:

Pingback from  Response.Redirect and Response.End   | Gunnar Peipman -  Programming Blog

# May 15, 2013 2:06 PM

Some extension methods for DateTime | Gunnar Peipman - Programming Blog said:

Pingback from  Some extension methods for DateTime   | Gunnar Peipman -  Programming Blog

# May 15, 2013 6:59 PM

Gunnar Peipman's ASP.NET blog said:

Extensions methods are pretty powerful thing because we can extend existing types without inheriting

# May 29, 2013 1:54 AM