FileInfo theSourceFile = new FileInfo(@"C:\WindowsFormsApplication1.txt"); StreamWriter str1 = new StreamWriter(@"C:\WindowsFormsApplication2.txt", false); StreamReader stream = theSourceFile.OpenText(); string sline; while ((sline = stream.ReadLine()) != null) { string hex = ""; foreach (char c in sline) { int tmp = c; hex += String.Format("{0:x2}", (uint)System.Convert.ToUInt32(tmp.ToString())); } str1.WriteLine(hex); str1.Close(); } stream.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)