I did a quick check on MSDN followed by a quick search here but I did not find anything definitively stating what characters are/are not allowed in .net resource string names. Currently I am trying to find out if a ":" is allowed, but I would prefer to find some reference that covers all cases.
Asked
Active
Viewed 533 times
1
-
if in doubt, go without. – Wug Aug 21 '12 at 14:16
-
1If in doubt, why can't I find out? – Darren Aug 21 '12 at 14:23
-
you could always try it. – Wug Aug 21 '12 at 14:25
-
Well, I have a few files checked out of source control for a very large project with no dependencies set up to run it locally for testing. I assumed it would be much faster just to check online. – Darren Aug 21 '12 at 14:28
1 Answers
2
Colon is not allowed on resources names. If you try it, you'll get
The resource name XX:XXX is not a valid identifier
For resources names applies the same rules as for variables. If you inspect the .designer
file you'll see that for every string resource you defined a property is created so it needs to follow the same naming rules.

Claudio Redi
- 67,454
- 15
- 130
- 155