Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enumerate resource library
Message
From
17/06/2008 06:13:45
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Enumerate resource library
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01324637
Message ID:
01324637
Views:
54
Hi,
I would like to get icon from external assembly resource library. I read couple of articles that I can use the following code to enumerate resources.
foreach(string resource in target.GetManifestResourceNames()) {
      string ext = Path.GetExtension(resource).ToLower();
   
      if (ext == ".bmp" || 
            ext == ".gif" ||
            ext == ".jpg" ||
            ext == ".jpeg")
     {
          // Do whatever
     }
However, whan I try these code, the ext condition would never pass. It is because GetManifestResourceNames() return string array that contains resource name as below

myApp.MyModule.MyForm1.resource
myApp.MyModule.MyForm2.resource


Any ideas?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Reply
Map
View

Click here to load this message in the networking platform