protected virtual string ArrowDownImageUrlInternal { get { if (string.IsNullOrEmpty(ArrowDownImageUrl)) return Page.ClientScript.GetWebResourceUrl(this.GetType(), "FriendshipCircle.FCAdmin.skmControls2.ArrowDown.gif"); else return ArrowDownImageUrl; } } #endregion>I'm playing around with (what I thought) would be something pretty simple. I wanted to add some PNG images to my RESX file (Named ManagementResource.resx) to be used on a WinForm. I opened the RESX file, changed to Images, selected Add Resource > Add Existing File and selected my PNG files. The resx file is set-up as an Embedded Resource and the Custom Tool is set to ResXFileCodeGenerator. From what I understand VS should automatically create the ManagementResource.resource file and embed it in the assembly for me.
>ResourceManager resource = new ResourceManager("ManagementResource", Assembly.GetExecutingAssembly()); > >// Exception thrown on Image line >Image img = (Image)resource.GetObject("MyPNG"); >>
>Image img = (Image)resource.GetObject("MyPNG.png");
>
>