C
Cowboy \(Gregory A. Beamer\) [MVP]
This is very true, but does not explain what is happening. The compiler
sees:
Dim x as String = "veg"
Dim y as String = "veg"
and says "hey, it is the same constant." Underneath the hood, some magic
happens. NOTE: This is actually the JIT compiler that does this magic and
not the initial IL compile. Tres kewl!
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
sees:
Dim x as String = "veg"
Dim y as String = "veg"
and says "hey, it is the same constant." Underneath the hood, some magic
happens. NOTE: This is actually the JIT compiler that does this magic and
not the initial IL compile. Tres kewl!
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
Tom Spink said:But let's not forget that they are immutable.... When you change the value
of a string object, the object is destroyed and a brand new one is created.
--
HTH,
-- Tom Spink, Über Geek
Woe be the day VBC.EXE says, "OrElse what?"
Please respond to the newsgroup,
so all can benefit