diff --git a/ValueOf.Tests/Equals.cs b/ValueOf.Tests/Equals.cs index d00e90e..215ad27 100644 --- a/ValueOf.Tests/Equals.cs +++ b/ValueOf.Tests/Equals.cs @@ -27,7 +27,7 @@ public void CaseInsensitiveEquals() Assert.AreEqual(clientRef1, clientRef2); Assert.AreEqual(clientRef1.GetHashCode(), clientRef2.GetHashCode()); Assert.IsTrue(clientRef1 == clientRef2); - Assert.IsTrue(clientRef1.Value == "ASDF12345"); + Assert.IsTrue(clientRef1 == "ASDF12345"); CaseInsensitiveClientRef clientRef3 = CaseInsensitiveClientRef.From("QWER98765"); Assert.AreNotEqual(clientRef1, clientRef3); diff --git a/ValueOf/ValueOf.cs b/ValueOf/ValueOf.cs index b707102..81993d3 100644 --- a/ValueOf/ValueOf.cs +++ b/ValueOf/ValueOf.cs @@ -82,7 +82,10 @@ public override int GetHashCode() return !(a == b); } - // Implicit operator removed. See issue #14. + public static implicit operator TValue(ValueOf a) + { + return a.Value; + } public override string ToString() {