On Friday, July 11, 2014, Kevin Connell <ke...@connells.net> wrote:

> Is throwing a NotImplementedExceptions  an appropriate pattern in a getter?
>
>
Not really an appropriate pattern, no. Which classes were these? Part of
the mono framework?

"Avoid throwing exceptions from property getters.
Property getters should be simple operations without any preconditions. If
a getter might throw an exception, consider redesigning the property to be
a method. This recommendation does not apply to indexers. Indexers can
throw exceptions because of invalid arguments."

>From http://msdn.microsoft.com/en-us/library/vstudio/ms229006(v=vs.100).aspx
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to