TypeConverter.CreateInstance-Method

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
 
G

Guest

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 */
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top