Default interface methods and default values for Auto Properties
问题 Given that an auto property compiles to a get_method, a set_method and a private variable and since C# 8 is introducing default interface methods Can properties in Interfaces have default implementations? Especially a get only property? 回答1: Yes. Auto properties aren't a special type of property. They are a convenience feature that generates the code needed to store property values in a backing field. You can specify a default implementation for properties, both for getters and setters. You