Where do Java and .NET string literals reside?
Strings in .NET are reference types, so they are always on the heap (even when they are interned). You can verify this using a debugger such as WinDbg. If you have the class below class SomeType { public void Foo() { string s = “hello world”; Console.WriteLine(s); Console.WriteLine(“press enter”); Console.ReadLine(); } } And you call … Read more