outFileInfo.LastWriteTime) { using (Stream inStm = File.OpenRead(RawFilePath)) { using (StreamWriter sw = new StreamWriter(HeaderFilePath)) { sw.WriteLine(SourceHeader); int count = 0; int rawChar = inStm.ReadByte(); while(rawChar != -1) { sw.Write("0x{0:x2}, ", rawChar); count++; if(count % 8 == 0) { sw.WriteLine(); } rawChar = inStm.ReadByte(); } sw.WriteLine(SourceFooter); } } } } ]]>