Get Resources with string

c#

Solution

I solved the problem this code snippet:

string st = Properties.Resources.ResourceManager.GetString(tableName);

So, I don't use the filename, I use the txt file's string. This is useful for me.

Thanks a lot.

Problem

I have a lot of txt files in Resources folder. One of them is corner.txt. I can access this file via this code snippet: ``` Properties.Resources.corner ``` I keep file names in string variables. For example: ``` string fileName = "corner.txt"; ``` I want to access this file via: ``` Properties.Resources.fileName ``` Is this possible? How can I access?

Original source

Related problems