How do I create Extension Methods for string type in Asp.net MVC 2 ?
Hi I'm trying to reach this goal but as far as I am, I've got nothing. 
I wish to add some static method to string type, which would return new changed string. I've got: using System;

    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Security.Cryptography;
    using System.Text;
    namespace TestProject.Models
    {
        public static class Extension
        {
            public static string md5(this string input)
            {
               
                MD5 HashAlgorithm = new MD5CryptoServiceProvider();
                Byte[] InputsBytes = Encoding.UTF8.GetBytes(input3);
                Byte[] HashedInput = HashAlgorithm.ComputeHash(InputsBytes);
                return BitConverter.ToString(HashedInput);
            }
        }
    }
honestly I just don't know where should it be. I put it in my models catalog but I'm pretty sure it's wrong. Where should it be? And what then? I'd like to use it in this way:

    string hashedString = String.md5(input); 
How do I create Extension Methods for string type in Asp.net MVC 2 ?
===

Hi I'm trying to reach this goal but as far as I am, I've got nothing. 
I wish to add some static method to string type, which would return new changed string. I've got: using System;

    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Security.Cryptography;
    using System.Text;
    namespace TestProject.Models
    {
        public static class Extension
        {
            public static string md5(this string input)
            {
               
                MD5 HashAlgorithm = new MD5CryptoServiceProvider();
                Byte[] InputsBytes = Encoding.UTF8.GetBytes(input3);
                Byte[] HashedInput = HashAlgorithm.ComputeHash(InputsBytes);
                return BitConverter.ToString(HashedInput);
            }
        }
    }
honestly I just don't know where should it be. I put it in my models catalog but I'm pretty sure it's wrong. Where should it be? And what then? I'd like to use it in this way:

    string hashedString = String.md5(input); 