public int Total { get { return Price * Quantity; } } uses a property with only a get accessor returning a calculation, which is correct.
Step 2: Check other options for errors
public int Total { set { Price = value; } } only has set, so not read-only. public int Total => Price + Quantity { get; set; } mixes expression body with get/set incorrectly. public int Total() { return Price + Quantity; } is a method, not a property.
Final Answer:
public int Total { get { return Price * Quantity; } } -> Option B
Quick Check:
Read-only computed property = get only [OK]
Quick Trick:Read-only properties have only get accessor [OK]
Common Mistakes:
MISTAKES
Using set accessor in read-only properties
Confusing methods with properties
Incorrect expression body syntax
Master "Properties and Encapsulation" in C Sharp (C#)
9 interactive learning modes - each teaches the same concept differently