Abstract
We don’t always choose the interfaces we work with. For example, I would rather have my car drive me to my destination by itself, without me having to give 100 percent of my attention to the road and the dangerous lunatics driving next to me. It’s the same with software: sometimes you don’t really want a piece of functionality, but it is built into the interface. So what do you do? You make a Null Object.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
ImpromptuInterface is an open-source dynamic “duck casting” library built on top of DLR and Reflection.Emit. Its source code is available at https://github.com/ekonbenefits/impromptu-interface and you can install it directly from NuGet.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Dmitri Nesteruk
About this chapter
Cite this chapter
Nesteruk, D. (2019). Null Object. In: Design Patterns in .NET. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4366-4_20
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4366-4_20
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4365-7
Online ISBN: 978-1-4842-4366-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)