TypeConverter.CreateInstance-Method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oskar Vaia

    TypeConverter.CreateInstance-Method

    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


  • Sven Groot

    #2
    Re: TypeConverter.C reateInstance-Method

    Oskar Vaia wrote:[color=blue]
    > 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?[/color]

    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



    Comment

    • Cor Ligthert

      #3
      Re: TypeConverter.C reateInstance-Method

      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
      [color=blue]
      > 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[/color]
      please[color=blue]
      > insert here an example?[/color]


      Comment

      • Oskar Vaia

        #4
        Re: TypeConverter.C reateInstance-Method

        hi,

        thx for your answers.
        ok, but what does it so mean in the context with the
        Typeconverter.C reateInstance-Method?

        bye

        Oskar


        Comment

        Working...