Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    Just note that Copy() and Clone() are methods, not properties. I believe the OP is referring to property getters returning new instances. Commented Nov 8, 2016 at 11:48
  • 6
    i know. but properties are (sort of) also methods in c# Commented Nov 8, 2016 at 11:51
  • 4
    In that case, C# has much more to offer: String.Substring(), Array.Reverse(), Int32.GetHashCode(), etc. Commented Nov 8, 2016 at 14:21
  • If your heading class was an immutable value type - I think you should add that property setters on immutable objects should return the new instances always (or at least if the new value is not the same as the old value), because that's the definition of immutable objects. :) Commented Nov 8, 2016 at 14:33