How do I create Extension Methods for string type in Asp.net MVC 2?

Try this : string hashedString = input. Md5().

Try this : string hashedString = input. Md5(); Extension methods are compiler trick the actual call is just a normal static method call. The compiler just turns the code into: string hashedString = TestProject.Models.Extentions.

Md5(input).

It helps! ;) but why is that if I daclare it as a static method? Is it feature of extensions?

– trn Oct 31 '10 at 20:58 The method is static because you don't need an object of the Extension class to use it. – Paul Creasey Oct 31 '10 at 21:13 right, now it's obvious. Thx for help and explanation ;) – trn Oct 31 '10 at 21:24.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions