Skip to content

Commit

Permalink
Added ToString method for Mutability struct (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindevans authored Feb 7, 2023
1 parent dacd910 commit c0117d1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ public override int GetHashCode()
return Value.GetHashCode();
}

/// <inheritdoc />
public override string ToString()
{
return Value switch
{
0 => nameof(Immutable),
1 => nameof(Mutable),
_ => throw new ArgumentOutOfRangeException()
};
}

/// <summary>
/// Compare a to b and return true if they are equal
/// </summary>
Expand Down

0 comments on commit c0117d1

Please sign in to comment.