Records were introduced in C# 9.0 and are not available in earlier versions of C#. Therefore, if a C# program is compiled with an earlier version of the language, a compilation error will occur when attempting to utilize a record type. Additionally, records may also be subject to certain language limitations, such as not being able to inherit from classes or use certain attribute types, which may cause compilation errors if violated.
Asked: 2022-12-28 11:00:00 +0000
Seen: 12 times
Last updated: Feb 18 '23