Skip to content

Document the possible footgun for compute-on-initialization properties and the with operator #47503

@jskeet

Description

@jskeet

Type of issue

Other (describe below)

Description

As discussed by email. For context for anyone else: https://codeblog.jonskeet.uk/2025/07/19/unexpected-inconsistency-in-records/

I think this can probably just be a note, but it would be good to highlight that this is a really easy way of getting into an inconsistent state.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record#nondestructive-mutation

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/builtin-types/record.md

Document Version Independent Id

de1f383b-ef20-4776-57a8-04edae892166

Platform Id

c94d9d75-515e-5ecb-047f-9b46664c7454

Article author

@BillWagner

Metadata

  • ID: 20818c64-4ad8-fb15-5d79-e7f98614e9c4
  • PlatformId: c94d9d75-515e-5ecb-047f-9b46664c7454
  • Service: dotnet-csharp
  • Sub-service: lang-reference

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions