I have never come across a valid use case for the write-only property. Honestly, if there is a valid use case for a write-only record property, I think it is safe to say that the solution is poorly designed.
If you need write-only semantics, you should use the method. For example, another user found an example of a user object that uses the write-only property to set a password. This is a bad design:
class User { public string Password { set { } } }
Ugh. This is much better:
class User { public void SetPassword(string password) { } }
See, the read / write property is a set of methods that are designed to mask as a field. They look and feel like field. For this reason, the read-only property makes sense because we are used to the fact that we can read fields and variables, but cannot change them. However, there is no corresponding field construct or variable that is writable but not readable.
That's why I think creating an API that uses write-only properties is bad practice. It contradicts intuition of what I consider to be the main goal of property syntax in C #.
Edit: More philosophy ... I believe that classes perform a functional task: they provide a container for related data that needs to be stored and processed. Take, for example, the User class - this class will contain all pieces of information that relate to the user in the system. We collect all this data and give them one name: user. This way we use classes to create abstractions. User is an abstraction that allows us to reason about all the separate pieces of data that make up the user (password, name, birthday, etc.).
Now there are good abstractions and there are bad abstractions. I believe that write-only properties are bad abstractions, because you allow someone to enter data and not read it. Why don't you allow it? Most likely because the information that was transmitted was somehow transformed, which makes it unreadable to passers-by.
Thus, this means that the write-only property should, by definition, create side effects that the caller cannot see (because if they could see them, then there would be no reason for the property to be write-only). The best C # construct for setting a value with side effects is a method.
I would highly recommend not using write-only properties, because users of your API will find them confusing and disappointing. Even if you find a valid use case for this syntax, it does not justify its use.
Edit: Here is the official .Net Framework recommendation Design Guide for creating class libraries → Element Design Guide → Property Design
Do not provide installation-only properties.
If the getter property cannot be provided, use the method to implement instead. The method name should begin with Set followed by the name of the property ...