ResXResourceWriter not found in System.Resouces 
Author Message
 ResXResourceWriter not found in System.Resouces

Hi all

found a helpful snippet (see below) about resx files on

ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconresourcesinresxfileformat.htm

- 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();
   }

Quote:
}

//////////////////////////////

any help very gratefully received
many thanks
steven shingler



Fri, 22 Apr 2005 22:03:05 GMT  
 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



Fri, 22 Apr 2005 22:09:09 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. system can not find system.forms

2. multiple language resouces does not work

3. Help! System.Data not found

4. "system" could not be found

5. could not find file system.winforms.dll

6. System DBG files not found

7. ???? System.Net namespace not found?

8. I can not find System.Web.UI.WebControls

9. "System.Net" not found

10. System.WinForms not found

11. Unhandled Exception: System.Configuration.ConfigurationException: Could not create System Configuration.NameValueSectionHandler, System

12. Find and Replace, Not Find and Overwrite

 

 
Powered by phpBB® Forum Software