The Freak Parade

Strange noises from the mind of Nathan Stults…
  • rss
  • Home
  • About The Freak Parade

When is someone going to set up our Extension Method library?

April 5, 2008

The first method that should go in there is this one: very clever idea, and needed it only moments ago. Nothing revolutionary, but he’s right – almost every time you need to use String.Format, it’s after you’re halfway through writing a string…

You get to do things like this:

“Some long string la la la ooh {0} really should be a template”.FormatWith(this);

 

Click Here for the implementation: Format As Extension method

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • DZone
  • Digg
  • Google Bookmarks
  • Ma.gnolia
  • Technorati
hello
Categories
General, Tools
Comments rss
Comments rss
Trackback
Trackback

« Useful web tool – CSS styles for simple message boxes Extension Method internals – for Alex »

  • Nathan
    Thanks Alex. Let's use something like Hsi.Code.Extensions, so that we can reserver Hsi.Extensions for when we build end user extensibility points into our products :)
  • Alex
    I suggest that, when appropriate, we have a folder (i.e., a namespace) called Extension at project level, and we can put one or more static classes there. That way, we know, by looking at the namespaces we include in code, where those extension methods in code come from. I will set up one for Hsi.Extension, and start putting some basic ones, like the string format.
blog comments powered by Disqus

Subscribe

Calendar

April 2008
M T W T F S S
    May »
 123456
78910111213
14151617181920
21222324252627
282930  

Recent Posts

  • Lucy in the Sky with Ruby
  • Simple ASP.NET MVC Ajax Proxy
  • The incredible, fallible symmetric Unit Test, and the beauty of Open Source software.
  • You Can’t Fill an Imaginary Hole
  • I don’t know but I’ve been told, ETL is gettin’ mighty old. BAM! BAM! EDA! I want my data right away!

Recent Comments

  • Kim Won on SOA, ESBs and JBOWS, oh my!
  • AbdirahmanDaud on New Open Source .NET CMS/EPS Platform Released Today: Sense/Net 6.0 Beta 1
  • None on Rinsing the SOAP from WCF (or, RESTful WCF Hyperlink Acupuncture)
  • chill71uk on Simple ASP.NET MVC Ajax Proxy
  • mrhookah on Rule Based Access Control using an Expression Evaluator

Tags

TDD Testing

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox