假设Resources里面资源文件都是图片:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
//从资源文件查找,并释放到目录下 Resources res = new Resources(); foreach (PropertyInfo item in res.GetType().GetProperties(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Instance)) { if (item.Name != "Culture" && item.Name != "ResourceManager") { if (item.GetValue(res, null) is Bitmap) { Bitmap b = item.GetValue(res, null) as Bitmap; if (!Directory.Exists(Path.Combine(Application.StartupPath, this.ImagePath))) Directory.CreateDirectory(Path.Combine(Application.StartupPath, this.ImagePath)); b.Save(Path.Combine(Application.StartupPath, this.ImagePath + item.Name + ".gif"), System.Drawing.Imaging.ImageFormat.Gif); } } }