cool hit counter Use Assembly.LoadFile and Assembly.LoadFrom with caution_Intefrankly

Use Assembly.LoadFile and Assembly.LoadFrom with caution


These two methods have been tested to lock the file, making it impossible to rename/delete/overwrite etc. the loaded assembly file while the program is running, so consider replacing it with the Assembly.Load() file byte group.

Assembly.Load(File.ReadAllBytes(@"c:a.exe"));

Note that the other overloaded methods of Assembly.Load() may also lock the file ~ specifically did not try, you can be sure that the Load file byte group method will not, I guess because the Load is the file is read into memory byte group, not in the file system on the file itself, so it will not lock the file ~ just guess, did not look deeper.


Recommended>>
1、Wisdom to the Valley Chinas new generation of artificial intelligence Jiashan Industry Jiashan Forum awaits your arrival
2、Lighting artists 10 things you have to know
3、Conscience discovery iPhone open to downgrade
4、MySQLsql Injection Research Summary
5、Global sex life big data are you dragging your feet

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号