BinaryReader を使用してバイナリ ファイルを読み取りたいのですが、例外が発生し続けます。
using (var stream = File.Open("file.bin", FileMode.Open, FileAccess.Read))
{
using (BinaryReader r = new BinaryReader(stream)) //EXCEPTION
{
}
}
「file.bin」はビルドアクションでコンテンツとして設定されていますが、この例外が発生し続けます:
System.MethodAccessException が処理されませんでした
メソッドにアクセスしようとして失敗しました: System.IO.File.Open(System.String, System.IO.FileMode, System.IO.FileAccess)