Boxing : Converting a value type to reference type is called Boxing. Does calling ToString() on a String qualify as Boxing ??? No, I don't think so at all. Try disassembling your assembly and checking the IL generated. I'm almost positive that the IL generated for your particular code snippet will not include a box-unbox pair of instructions.
AFAIK, calling ToString() on a string object (admittedly a silly thing to do...all too common with amateurs) will only return the reference of the string instance. On Oct 3, 1:18 am, altja <[EMAIL PROTECTED]> wrote: > So the String class is immutable compared to the rest of the reference > types. > > Immutable = any change to the object causes the runtime to create a > new one and abandon the old one. > > So does this mean that String always trashes its object while any > other reference type just adds an additional pointer to the memory > location. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://cm.megasolutions.net/forums/default.aspx <p><a href="http://feeds.feedburner.com/DotNetDevelopment"><img src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&fg=444444&anim=1" height="26" width="88" style="border:0" alt="" /></a></p> -~----------~----~----~----~------~----~------~--~---
