[Mono-list] Namespaces and resources

Chris Aitken chris at ion-dreams.com
Thu Nov 17 10:12:05 EST 2005


Hi All,

Following from my icon issue. I have SWF C# source code along the lines of:

Using ...

Public class Form : S.W.F.Form
{
	public Form()
	{
		.
		.
		.
		this Icon = new Icon(GetType(), "icon.ico"0;
		.	
		.
		.
	}
	public static void Main()
	{
	.
	}	
}

It runs fine and dandy. Now if I wrap all bar the using statements in:

Namespace Foo
{
...
}

Then it compiles OK, but when run, I get the Unhandled Exception:
System.IO.FileNotFoundException: Resource name was not found: 'icon.ico'

The addendum here
(http://www.jelovic.com/articles/resources_in_visual_studio.htm) suggests
that I should be renaming my icon file - but I am unsure as to what it
should be renamed to, to get this to work.
If I uncomment my this.Icon line, then the app compiles & runs fine (albeit
without icon).

Hope you guys have an idea...
Chris


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Mono-list mailing list