I am using following code to retrieve the Resource file values in C#
CultureInfo cultureInfo = new System.Globalization.CultureInfo("zh-CN"); // just hard coded to make question simpler
ResourceManager rm = new ResourceManager("SchedulingSystem", Assembly.GetExecutingAssembly());
var entry = rm.GetResourceSet(cultureInfo, true, true)
.OfType<DictionaryEntry>()
.FirstOrDefault(e => e.Value.ToString() == input);//input => "No_Records"
var key = entry.Key.ToString();
return key;
Both Key and Value returns as null, but if I use "Quick View" in Visual studio, I can see the values as shown in the Image, The input "No_Records" can be seen in Quick view of object.
I have also referred stack overflow quesitons like [Why does ResourceManager.GetResourceSet return null on the first request after a build? (C#)
What I might have missed in my c# code?