using System; using System.Security.Cryptography; class Program { static void Main(string[] args) { string inputString = "Hello World!"; using(var md5 = new MD5CryptoServiceProvider()) { byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(inputString); byte[] hashBytes = md5.ComputeHash(inputBytes); Console.WriteLine("MD5 Hash of Input String:"); foreach (var b in hashBytes) { Console.Write("{0:x2}", b); } // release resources md5.Clear(); } } }In this example, we create an instance of the MD5CryptoServiceProvider class and pass an input string "Hello World!" to compute its MD5 hash. After printing the hash value, we clear the resources used by the MD5CryptoServiceProvider object using the Clear method. The MD5CryptoServiceProvider class is part of the .NET Framework's System.Security.Cryptography library.