How to get the comment from a .resx file entry

Orlando William picture Orlando William · Jan 13, 2012 · Viewed 12.1k times · Source

Strings in resource files have a name, a value and a comment
The ResXResourceReader class gives me access to the name and the value.
Is there a way to read the comment?

Answer

Arnold Zokas picture Arnold Zokas · Jan 13, 2012

You should be able to get Comment via ResXDataNode class: http://msdn.microsoft.com/en-us/library/system.resources.resxdatanode.aspx

You will need to set UseResXDataNodes flag on the reader: http://msdn.microsoft.com/en-us/library/system.resources.resxresourcereader.useresxdatanodes.aspx