Recently at work we had a requirement to have enum values displayed as proper words rather than camle cased. But you can't override the ToString method. But what about using the Extension Methods feature of c# 3.0. Now it seems like agood idead to do what upon future investigate you can't override methods like you would a virtual, you can only add new methods. So then i begs the point, what is the point of Extension Methods. The only case that i can see is if the class is sealed in a 3rd party library that you can't change, that you want to add a method, rather than having a Utils class to do the work for you. Now this is good, becuase then you can see all the methods in the visual studio intellisense. But if you own the class, then there really is no point, you would just add the method yourself.
The could be a way to use numerous different methods with the same name, but in different namespaces, but i haven't fully thought about that yet, and propably wont until 3.0 has gone into release.
Here are some links, though they are kind of old:
http://blah.winsmarts.com/2006/05/18/demystifying-c-30--part-3-extension-methods.aspx
http://mtaulty.com/communityserver/blogs/mike_taultys_blog/archive/2006/03/20/5798.aspx
http://www.cincomsmalltalk.com/userblogs/malby/blogView?showComments=true&entry=3304188302
http://blogs.msdn.com/abhinaba/archive/2005/10/21/483337.aspx
1 comment:
instyler, hollister, oakley, nfl jerseys, jimmy choo outlet, nike air max, north face outlet, soccer jerseys, louboutin, hollister, celine handbags, ghd hair, baseball bats, soccer shoes, gucci, ray ban, beats by dre, longchamp uk, lululemon, nike air max, ralph lauren, ferragamo shoes, bottega veneta, converse outlet, p90x workout, mcm handbags, nike trainers uk, converse, vans outlet, north face outlet, giuseppe zanotti outlet, hermes belt, reebok outlet, mont blanc pens, hollister clothing, chi flat iron, babyliss, herve leger, mac cosmetics, nike roshe run, valentino shoes, insanity workout, vans, nike huaraches, wedding dresses, iphone cases, timberland boots, new balance shoes, abercrombie and fitch, asics running shoes
Post a Comment