从resx文件读取资源非常慢

时间:2014-12-10 21:40:56

标签: c# asp.net performance resources resource-files

我有一个资源文件 -stringsCommon0.resx

它是1320行

使用以下代码阅读资源

DateTime time1 = DateTime.Now;

string strResult = Resources.stringsCommon0.ResourceManager.GetString(stringName);                

DateTime time2 = DateTime.Now;

double mil = (time2 - time1).TotalMilliseconds;

当我看到mil时,它会给出15到17之间的结果,

我认为这是非常大的数字,因为在我的应用程序中,我总是通过代码相信来自stringsCommon0。

在调试时获取值。

我现在该怎么办?结果正常吗?我还应该为多语言做些什么?

0 个答案:

没有答案
相关问题