I would like to use the resources in my solution by passing a string variable to Properties.Resources:
string[] documents = new string[] { "one", "two", "three"};
foreach (var document in documents)
{
extractFile(String.Format(@"C:\temp\{0}.doc",document), properties.Resources.document);
}
private void extractFile (string destinationFile, byte[] sourceFile)
{
File.WriteAllBytes(destinationFile, sourceFile);
}
But i cannot use the string "document" for properties.Resources like this.
('Resources' does not contain a definition for 'document')
How can I make this work?