
ResXResourceWriter not found in System.Resouces
Steven,
The reason for this is because it is in the System.Windows.Forms
namespace. So you need to put:
// Define shorthand for the System.Windows.Forms namespace.
using System.Windows.Forms;
At the top of your file. Also, you need to add a reference to
System.Windows.Forms.dll as well.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
Quote:
> Hi all
> found a helpful snippet (see below) about resx files on
ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconresourcesinresxfileformat.htm
Quote:
> - but when i try to put the code into a class in my web application it
> can't find the ResXResourceWriter in System.Resouces.
> Its there in the docs for all to see - but not in the code.
> here's the snippet:
> //////////////////////////////
> using System;
> using System.Drawing;
> using System.Resources;
> public class MainApp
> {
> public static void Main()
> {
> Image img = Image.FromFile("en-AU.jpg");
> ResXResourceWriter rsxw = new ResXResourceWriter("en-AU.resx");
> rsxw.AddResource("en-AU.jpg",img);
> rsxw.Close();
> }
> }
> //////////////////////////////
> any help very gratefully received
> many thanks
> steven shingler