What does it mean to say that strings are immutable in C#.

YHY 41 Reputation points
2021-04-21T21:47:32.18+00:00

Please help! I would appreciate that.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,098 questions
0 comments No comments
{count} votes

Accepted answer
  1. WayneAKing 4,921 Reputation points
    2021-04-22T00:26:17.53+00:00

    String Class
    https://learn.microsoft.com/en-us/dotnet/api/system.string?view=net-5.0

    "A String object is called immutable (read-only), because its
    value cannot be modified after it has been created. Methods
    that appear to modify a String object actually return a new
    String object that contains the modification."

    • Wayne

0 additional answers

Sort by: Most helpful