Questions
After reading the chapter, you should be able to answer the following questions:
- True or false? Record structs are mutable:
a. True
b. False
Answer: a
- Which keyword should you use to make a record struct immutable?
a. A record struct is immutable by default.
b. readonly.
c. finally.
d. sealed.
Answer: b
- True or false? A compiler will infer the type expressions in all the scenarios:
a. True
b. False
Answer: b
- In which version of C# were caller argument attributes first introduced?
a. C# 9
b. C# 8
c. C# 5
d. C# 7
Answer: c