1
Answer

using indirection to create an object reference from a string

Sigsby Rusk

Sigsby Rusk

12y
1.4k
1
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.

Answers (1)