您的位置:首页 > 其它

How release file loaded with Assembly.LoadFrom() ?

2008-02-03 08:33 483 查看
load the file into a byte array and use Assembly.Load(byte[]) instead.
private void GenerateWebserviceAgents()

// Loads the content of a file to a byte array.

static byte[] LoadFile(string filename)

{

FileStream fs = new FileStream(filename, FileMode.Open);

byte[] buffer = new byte[(int)fs.Length];

fs.Read(buffer, 0, buffer.Length);

fs.Close();

return buffer;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐