TypeConverter.CreateInstance-Method

  • Thread starter Thread starter Oskar Vaia
  • Start date Start date
O

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
 
C# has a System.String class . This classes are immutable meaning that the
values of the strings cannot be changed once the strings have been created.
The instances methods that appear to modify the actual content of a string
actually create a new string to return, leaving the original string
unchanged. Thus the following C# does not modify the string
String csString = "Sathish Jeyakumar";
csString.ToLower(); /* Does not modify string, instead returns lower case
copy of string */
 
Back
Top