Null object pattern: Difference between revisions

Content deleted Content added
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="vbvbnet">
Public Class Animal
Public Shared ReadOnly Empty As Animal = New AnimalEmpty()