Is there any way to check if a resource exists in an assembly without having to use exception handling? I\'m currently loading images from several assemblies, and if they don\'
Would something like this work for you?
// Member Variable
string [] resourceNames;
// Function
Boolean ResourceExists(string resourceName)
{
if (resourceNames == null)
{
resourceNames =
Assembly.GetExecutingAssembly().GetManifestResourceNames();
}
return resourceNames.Contains(resourceName);
}