开发者

How to write all three values using the resxresourcewriter?

http://msdn.microsoft.com/en-us/library/system.resources.resxresourcewriter.aspx

In this link and others like it, I see code to write in the "name" and "value" but not the "comment". I use the comment field heavily. Is there code for accessing all 3 simultaneously or the comment field individually? Or do I have to开发者_Go百科 manipulate the XML directly?


Apparently you can set the comment on a ResXDataNode object. You can then write the ResXDataNode with the ResXResourceWriter.AddResource(ResXDataNode) method.

resxWriter.AddResource(new ResXDataNode("key", "value") { Comment="comment" });

Source: http://www.codeproject.com/KB/dotnet/ResxSync.aspx?msg=1708100 (after the main article, comment "Comments ARE accesible [modified]")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜