Record and thread safety

T.Zacks 3,986 Reputation points
2022-05-17T17:34:29.077+00:00

we know List<T> is not thread safe and i heard Record class is thread safe but unfortunate that not a single code example found where multiple thread and Record class has been used together to show Record class is thread safe.

anyone can come with a example which show Record class is thread safe. Thanks

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,307 questions
0 comments No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 35,196 Reputation points
    2022-05-17T18:05:53.857+00:00

    Don't have a sample but can say that since a record is immutable it's thread safe.

    See this


0 additional answers

Sort by: Most helpful