遍历Resources下资源文件方法
默认Resource遍历
Properties.Resources res = new Properties.Resources();
PropertyInfo[] properInfo = res.GetType().GetProperties(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Instance);
foreach (PropertyInfo item in properInfo)
{
}
新增资源文件遍历
using System.Collections;
var resourceSet = Resources.Vpps.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true); //Vpps为新增资源文件
var count = resourceSet.Cast<object>().Count();
foreach (DictionaryEntry item in resourceSet.Cast<object>())
{
string s = item.Key.ToString();
byte[] data = (byte[])item.Value;
}