I have a C# program with 4 files embedded in the Properties.References.
I need to access one of the files from a filename passed in to a function. What is the syntax for developing the "Properties.References.filename" access?
Thanks.
Perhaps this was not clear. What I have is like:
private void setPalette(string filename)
{
byte[] Palette = Properties.References.??????? ;
}
Where the content of filename is "Palette_1" for example, one of the byte arrays in References.
I need to use the parameter filename to select the desired array.
Using indirection to create an object reference from a string
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jan 16, 2012, 9:33 AM EST
string text = Properties.Resources.TextFile1;
where TextFile1 is the resource name for a text file called TextFile1.txt.