resgen

The following command, with no options specified, displays the command syntax and options for Resgen.exe.

resgen

The following command reads the name/value pairs in myResources.txt and writes a binary resources file named myResources.resources. Because the output file name is not specified explicitly, it receives the same name as the input file by default.

resgen myResources.txt 

The following command reads the name/value pairs in myResources.txt and writes a binary resources file named yourResources.resources.

resgen myResources.txt yourResources.resources

The following command reads an XML-based input file myResources.resx and writes a binary resources file named myResources.resources.

resgen myResources.resx myResources.resources

The following command reads a binary resources file myResources.resources and writes an XML-based output file named myResources.resx.

resgen myResources.resources myResources.resx

The following command reads an XML-based input file myResources.resx and writes a .txt file named myResources.txt. Note that if the .resx file contains any embedded objects, they will not be accurately converted into the .txt file.

resgen myResources.resx myResources.txt

The following command reads an XML-based input file myResources.resx and writes a binary resources file named myResources.resources. It also generates a Visual Basic file named MyFile.vb with a class named MyClass that contains strongly-typed properties that match the resources that are referenced in the input file. The MyClass class is contained within a namespace named Namespace1.

resgen myResources.resx myResources.resources /str:C#,Namespace1,MyClass,MyFile.cs
posted @ 2010-04-05 20:58  greencolor  阅读(277)  评论(0编辑  收藏  举报