TypeConverter.CreateInstance-Method
(Tuesday, December 21, 2004)
Found the following interesting discussion in the Newsgroups:
TypeConverter.CreateInstance-Method by:Oskar Vaia
| Hi,
in the .NET Framework Class Library there is the following text in the "Remarks"-section:
"Use this method for objects that are immutable, but for which you want to provide changeable properties."
.... objects that are immutable ... - what does this mean? Can someone please insert here an example?
thx & bye
Oskar
| | | Reply: by:Sven Groot
| | | An immutable object is an object who's internal state cannot change after it has been created. Strings are an example of immutable objects in the .Net Framework. You can never change the value of an existing String object, since all its methods return a new String object, leaving the original object intact.
-- Sven Groot
http://unforgiven.bloghorn.com
| | | Reply: by:Cor Ligthert
| | | Hi Oskar,
A String is immutable, a change will mean that it is written on a new place and the old one is destroyed when the Garbadge Collecter does his work.
I hope this clears it a little bit?
Cor
| | | Reply: by:Oskar Vaia
| | | hi,
thx for your answers. ok, but what does it so mean in the context with the Typeconverter.CreateInstance-Method?
bye
Oskar
|
|
0 Comments:
Post a Comment