[ad_1]
As soon as once more, we check out the normal “if (boolean) return true; else return false;” sample. However at the moment’s, from RJ, affords us a bonus twist.
public override bool IsValid
{
get
{
if (!base.IsValid)
return false;
return true;
}
}
As promised, it is a ineffective conditional. return base.IsValid would do the job simply as properly. Besides, that is the twist, is not it. base is our superclass. We’re overriding a technique on our superclass to… simply do what the bottom methodology does.
This complete perform might simply be deleted. Nobody would discover. And but, it hasn’t been. Everybody agrees that it needs to be, but it hasn’t been. Nobody’s doing it. It simply sits there, like a pimple, begging to be popped.

Hold the plebs out of prod. Limit NuGet feed privileges with ProGet. Study extra.
[ad_2]
Source link