Quiz · Classes and objects · lesson 7 of 11Quiz — property and fieldWhat is a property in C#, and how does it differ from a public field?[A]A property is another name for a public field: the compiler turns every read and write into a direct access to the field, so get and set cannot hold any code, such as a check of the value that is being written.[B]A property is read and written only by calling it with parentheses, Floors() to read it and Floors(3) to write it, so unlike a public field it can never stand on the left of = in an assignment.[C]A property must always offer both get and set to all code, so it can never be read-only for code outside the class. To forbid any writes from the outside, you have to replace the whole property with a pair of ordinary methods instead.[D]A property looks like a field to other code, but reading it runs its get code and writing runs its set code. So unlike a public field, it can check a value or close writing. An auto-property keeps its value in a hidden field.← BackPropertiesNext →Static members