Is there an attribute or add-on for Visual Studio that one could use like the java attribute org.openide.util.NbBundle.Messages?
Asked
Active
Viewed 69 times
1 Answers
0
You can add a new file to the project of "resx" such Foo.resx. Click it 2 times and change the Access Modifier is public. Add as many lines as you need. Each line will be represented by a static class property which will call themselves Foo.NameOfStringExample. It mimics the behavior of this attribute with java.
You can refer to the methods of this class directly from application code.

user1618077
- 9
- 3
-
I was hoping for something that could be attached to the method so I don't have to go searching for it, like 'NbBundle.Messages'. Can you find anything like that? – BrainStorm.exe Oct 31 '14 at 14:42
-
You can add multiple fields to the class string, and the result will be the same as the attribute of java. Only by using a resource file when you change the name of the resource will change the entire code who uses it and a whole will work. See also this [link](http://stackoverflow.com/questions/2493143/how-do-you-read-the-value-of-an-attribute-in-a-method) – user1618077 Oct 31 '14 at 22:14