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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top