FxCop + MVP: “Properties should not be write only”
Question
Suppose I'm implementing an MVP pattern and I have a view interface as such:
interface IView {
string SuperRadString { set; }
}
There's no reason for the presenter to ever need to retrieve this string from the view, so can I safely ignore this error?
Solution
Well, yes...
However, semantically it would make more sense to have a method for setting the value than a "black hole property".
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow