开发者

Getting strings from resx into an array without looping - C#.net

I want to read all the strings from a resx file and load it into an array without looping. I'm working in an asp.net web application and i'm using C#. How can i get the strings?

T开发者_开发百科hank you

NLV


string[] allStrings;
using (var reader = new ResXResourceReader(fileName))
{
    allStrings = reader.Cast<DictionaryEntry>().Select(o => o.Value).OfType<string>().ToArray();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜