wpf 资源文件复制

  if (File.Exists(fileName))
            {
                File.Delete(fileName);
                using (FileStream fs = new FileStream(fileName, FileMode.Create))
                {
                    StreamResourceInfo resource = Application.GetResourceStream(new Uri("/xx;component/Resources/" + fileName, UriKind.Relative));
                    resource.Stream.CopyTo(fs);
                }
            }

 

posted @ 2020-04-19 19:32  灰主流  阅读(444)  评论(0编辑  收藏  举报