【发布时间】:2011-05-30 12:48:12
【问题描述】:
我需要以二进制模式打开并编辑一个可执行文件,将十六进制值替换为字符串。
在 PHP 中,如下所示:
<?php
$fp = fopen('file.exe', 'r+');
$content = fread($fp, filesize('file.exe'));
fclose($fp);
print $content;
/* [...] This program cannot be run in DOS mode.[...] */
?>
我如何在 C# 中获得它?
【问题讨论】: