I would like to access resources with different, but ordered names in order using a for loop. For Example:
class Program
{
static void Main(string[] args)
{
ExtractImages();
}
static void ExtractImages()
{
Bitmap bmp;
for (int i = 0; i < 6; i++)
{
// Here I need something like:
// bmp = new Bitmap(Properties.Resources.bg + i);
bmp = new Bitmap(Properties.Resources.bg0); // in order bg0..bg5
bmp.Save("C:\\Users/Chance Leachman/Desktop/bg" + i + ".bmp");
}
}
}
Any ideas? It's basically trying to make a String go to a variable name. Thanks!