CSharp QA
C# QA: 1. Which of the following C# features allows you to define immutable data types with value-based equality? a) Pattern Matching b) Record Types c) Nullable Reference Types d) Async/Await Answer: b) Record Types Explanation: The correct answer is b) Record Types . Record types in C# allow you to define immutable data types with value-based equality , where equality is determined by property values. Other options (Pattern Matching, Nullable Reference Types, and Async/Await) do not focus on immutability or value-based equality. 2. What is the purpose of nullable reference types in C# 8.0 and later? a) To make all reference types non-nullable by default b) To ensure that reference types can never be null c) To allow reference types to have nullable values with explicit null checks d) To enable value types to be nullable Answer: c) To allow reference types to have nullable values with explicit null checks Explanation: The correct answer is c) To allow referen...