110,539
社区成员
发帖
与我相关
我的任务
分享
private static Dictionary<string, object> _MyResources;
public static Dictionary<string, object> AllResource
{
get
{
if (_MyResources == null)
_MyResources = typeof(Properties.Resources)
.GetProperties(BindingFlags.NonPublic | BindingFlags.Static)
.ToDictionary(x => x.Name, x => x.GetValue(null));
return _MyResources;
}
}
xxx.Image = ImgRescources.Properties.Resources.XXXImage;
如果还有String是需要共享的,那么建议把Image和String可以分两个Project,生成两个独立的Assembly.可以提供给多个项目使用.