May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Opposite to read-only properties, you can also implement write-only properties. In real-life applications, write-only properties are uncommon, so you will probably never implement such members. It makes much more sense providing read-only members than members that you can only write to but not read from. Anyway, you can implement write-only properties marking your properties with the WriteOnly keyword as demonstrated in the following code snippet:

You have different options here; one is storing the value received by the setter within a field that you can then eventually reutilize. Otherwise, you can perform some tasks directly ...
Read now
Unlock full access