Assembly asm = Assembly.GetExecutingAssembly();
for(int i = 1; i <= 30; i++)
{
Stream file = asm.GetManifestResourceStream("NameSpace.Resources.Image"+i.ToString("000")+".png");
}
Get the name of all built-in resources:
string[] resourceNames = Assembly.GetManifestResourceNames();
foreach(string resourceName in resourceNames)
{
System.Console.WriteLine(resourceName);
}
Also, check the example in the Form1_Load function.
source
share