When I use a .resx file to store fixed string values (to be bound开发者_StackOverflow to controls on an .aspx page), are these strings interned?
I presume the compiler reads in the strings from the XML file and replaces them as literals in the code, and therefore they become interned.
Is this correct?
@Marc- good point. I tried it and the answer is, 'no', they're not interned, at least for the GetGlobalResourceObject() method, so I assume the same for local resources.
So, now I wonder why. Resources are meant to be constants and they are frequently used, so I would have thought interning makes sense.
Obviously, they're not literals, as they must be loaded from the XML resources file, but that shouldn't matter, should it?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论