如何把一个放在内嵌资源里的exe文件释放到指定的一个目录? HELP 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Sample code as follows:Stream strm = this.GetType().Assembly.GetManifestResourceStream( yourExeName );FileStream fs = new FileStream( yourSaveFileName, FileMode.OpenOrCreate );byte[] bBuffer = new byte[1024];int nRealRead;do{ nRealRead = strm.Read( bBuffer, 0, 1024 ); if( nRealRead > 0 ) fs.Write( bBuffer, 0 , nRealRead ); fs.Flush();}while( nRealRead == 1024 );fs.Close();strm.Close(); 难道没有人会解此问题? 用户登陆界面与数据库表里的数据是否匹配 remoting 如何传递组件? 程序在进程里不停止 C#怎么能简单的把图片和文字弄成互动的? vs2005在2003系统的棘手问题请教 有谁能描述C#做数据库应用开发的优势及不好的地方吗? 紧急求助一个数据读取的问题!!谢谢!!!! 如何望文件中多次序列化同一个类实例 不好意思,问一个语法问题。 dataGridView 用法小问题 关于DataSet中表关系映射的问题!(帮顶者有分)
Stream strm = this.GetType().Assembly.GetManifestResourceStream( yourExeName );
FileStream fs = new FileStream( yourSaveFileName, FileMode.OpenOrCreate );
byte[] bBuffer = new byte[1024];
int nRealRead;
do
{
nRealRead = strm.Read( bBuffer, 0, 1024 );
if( nRealRead > 0 )
fs.Write( bBuffer, 0 , nRealRead );
fs.Flush();
}
while( nRealRead == 1024 );
fs.Close();
strm.Close();