Web Log di Adrian Florea

"You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." Antoine de Saint-Exupery
posts - 440, comments - 2715, trackbacks - 3944

My Links

Archives

Post Categories

Image Galleries

.RO Blogs

.RO People

.RO Sites

Blogs

Furls

Links

vinCitori

NotSupportedException - quasi come se fosse una feature di linguaggio

Esiste una classe (System.NotSupportedException ma ce ne sono anche altre) che ha un ruolo più profondo nella progettazione in generale di una gerarchia di classi, quasi come se fosse una feature di linguaggio:
"There are methods that are not supported in the base class, with the expectation that these methods will be implemented in the derived classes instead. The derived class might implement only a subset of the methods from the base class, and throw NotSupportedException for the unsupported methods." (.NET Framework Class Library Reference)
"A typical scenario is when a base class declares a method that derived classes are required to implement, and the method is invoked on the base class. When a method throws System.NotSupportedException this usually indicates that the derived classes must provide an implementation of the method, and callers must invoke the method on the derived class." (SLAR, p. 335)

Print | posted on sabato 1 maggio 2004 20:20 | Filed Under [ Carillon .NET Pattern Dappertutto ]

Powered by:
Powered By Subtext Powered By ASP.NET