【文件属性】:
文件名称:Silverlight动态加载dll
文件大小:105KB
文件格式:RAR
更新时间:2014-09-24 15:07:34
silverlight,动态加载dll
Silverlight中动态加载dll文件
private void btnGetResource_Click(object sender, RoutedEventArgs e)
{
Grid grid = this.FindName("grid") as Grid;
if(grid.Children.Count==0)
{
WebClient webClient = new WebClient();
webClient.DownloadProgressChanged += webClient_DownloadProgressChanged;
webClient.OpenReadCompleted += webClient_OpenReadCompleted;
//注意:一定要压缩成Zip格式的文件,rar是不支持的
webClient.OpenReadAsync(new Uri("ResouceDll.zip", UriKind.Relative));
}
}
【文件预览】:
ResouceDll.dll
网友评论
- 没啥用,只是用来参考一下别人的思路,实质方法都是一样的