c# - LINQ to resx file? -


I am trying to create a way to get the key for the text given in the given .resx on file runtime.

Currently, I can open and read the file (using ResXResourceReader ) but I must use the foreach to go to the full file.

This could be a display issue, because some of our .resx files are quite large (in the order of 2000 stars) and we can do this often.

I want to use the object from the LINQ for this query because I think the where method is relatively optimized, though I am unable to do this. ResXResourceReader There are two ways of class AsQueryable () and GetEnumerator () , but do not allow LINQ with their result (hence the How can I make LINQ against some things provided by ResxResourceReader , or is it worth the time?

< Div class = "post-text" itemprop = "text">

The following code gives an IEnumerable object that allows you to use LINQ to query the content of the resource file:

ResXResource Reader Reader = New ResXResourceReader (myfile); IEnumerable & LT; DictionaryEntry & gt; Enumerator = Reader.offtype & lt; dictionaryEnterree & gt; ();

Comments