Content deleted Content added
→Extension methods and Null coalescing: Unreferenced section |
→Visual Basic .NET: fix syntaxhighlight error |
||
Line 437:
The following null object pattern implementation demonstrates the concrete class providing its corresponding null object in a static field <code>Empty</code>. This approach is frequently used in the .NET Framework (<code>String.Empty</code>, <code>EventArgs.Empty</code>, <code>Guid.Empty</code>, etc.).
<syntaxhighlight lang="
Public Class Animal
Public Shared ReadOnly Empty As Animal = New AnimalEmpty()
|