Question: Your application has a value type called username that needs to be able to accept null values, but this is generating compile-time errors. How would you fix this in code?
- Null
username = null; - string? username = null;
- Type
? username = null; - Optional
username = null;
Answer: The correct answer of the above question is Option B:string? username = null;