[Mono-list] How many strings do I have?
Juan Cristóbal Olivares
jc.olivares@pad.cl
Thu, 7 Oct 2004 15:49:10 -0400
This is funny...
http://weblogs.asp.net/bclteam/archive/2004/09/07/226487.aspx
When I compile it with Visual Studio and run in on Windows [.NET 1.1], I get
this:
Hello
Xello
Not Found
On GNU/Linux and Mono (mcs) I get this:
Hello
Xello
string is Hello
....
The IL code generated is almost the same...
The first thwo lines could be explained by the inmutability of strings.
Actually, strings are inmutable, except for the "unsafe" code blocks...
that's why the runtimes [mono and .NET] produce those resuts.
The difference between the runtimes seems to be the string comparation
algorithm.