Summary


Interfaces are a critical extension of object-oriented programming. Their value was accentuated during the days of Component Object Model (COM) programming, when interfaces defined the API between components and were critical to the versioning strategy through the life of a component.

Interfaces provide functionality similar to abstract classes but without using up the single-inheritance option, while constantly supporting derivation from multiple interfaces.

In C#, the implementation of interfaces can be either explicit or implicit, depending on whether the implementing class is to expose an interface member directly or only via a cast to the interface. Furthermore, the granularity of whether the implementation is explicit or implicit is at the member level: One member may be implicit while another on the same interface is explicit.

The next chapter looks at value types and discusses the importance of defining custom value types; at the same time, the chapter points out the subtle foibles that they can introduce.




Essential C# 2.0
Essential C# 2.0
ISBN: 0321150775
EAN: 2147483647
Year: 2007
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net