Home > Technology > List embedded resources

List embedded resources

November 24th, 2009 Leave a comment Go to comments

You can embed items into your WinForm app. So how to do you figure out what you have and the correct path to retreive the items? Here’s a method to show you what’s an embedded resource in your application.

Code:

using System.Diagnostics;
using System.Reflection;

private void ExposeResources()
{
	Assembly assembly = Assembly.GetExecutingAssembly();
	foreach ( string resource in assembly.GetManifestResourceNames() )
		Debug.WriteLine(resource);
}

Usage:

ExposeResources();

Reference:
http://msdn.microsoft.com/en-us/library/aa287526(VS.71).aspx

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.