Created
September 8, 2021 23:27
-
-
Save twofingerrightclick/a0eb029e6dbaf5f306aaafb2211d6dac to your computer and use it in GitHub Desktop.
Listing 12.5: Declaring a Nullable Type That Contains a Value Property of Type object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Nullable | |
{ | |
/// <summary> | |
/// Provides the value when HasValue returns true | |
/// </summary> | |
public object Value{ get; private set; } | |
/// <summary> | |
/// Indicates whether there is a value or whether | |
/// the value is "null" | |
/// </summary> | |
public bool HasValue{ get; private set; } | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment