C
C#3y ago
Lounder

Why can't an interface property have a private set? [Answered]

string WrittenMessageLog { get; private set; }
2 Replies
Lounder
LounderOP3y ago
I want to have a property string WrittenMessageLog { get; private set; } in my class which implements IWriter, but IWritter can't have a property with a private setter I want to have a method which is inside the Writer class and sets the value of WrittenMessageLog Oh yes, this works. Thank you!
Accord
Accord3y ago
✅ This post has been marked as answered!
Want results from more Discord servers?
Add your server