Many people separate their business logic and view classes into two or more separate assemblies. This gives rise to the ability to use an asymmetric set for view properties that aren’t meant to be accessible.
Simply put:
public string SomeProperty { get; internal set; }
The internal modifier means that this property is only accessible to classes in the same assembly. Obviously asymmetric properties in general are applicable in other scenarios. Note too that while this is using the compact property syntax, the same principle holds for explicit setters.
No Comments