File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ public void BoxUnbox()
88 {
99 var obj = ( BoxedValue < int > ) 42 ;
1010 Assert . AreEqual ( 42 . GetHashCode ( ) , obj . GetHashCode ( ) ) ;
11- Assert . AreEqual ( 42 , obj . GetReference ( ) ) ;
12- // Assert.AreEqual(42, (int)obj);
13- // Assert.AreEqual(typeof(int), obj.GetType());
11+ Assert . AreEqual ( 42 , obj . Unbox ( ) ) ;
12+ Assert . AreEqual ( 42 , ( int ) obj ) ;
13+ Assert . AreEqual ( typeof ( int ) , obj . GetType ( ) ) ;
1414 }
1515
1616 // [TestMethod]
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public static implicit operator ValueReference<T>(BoxedValue<T> boxedValue)
120120
121121public static class BoxedValue
122122{
123- public static ref T GetReference < T > ( this BoxedValue < T > boxedValue )
123+ public static ref T Unbox < T > ( this BoxedValue < T > boxedValue )
124124 where T : struct
125125 => ref boxedValue . value ;
126126}
You can’t perform that action at this time.
0 commit comments