System.Reflection.Tests.PointerTests.PointerMethodReturn C# (CSharp) Method

PointerMethodReturn() private method

private PointerMethodReturn ( int value ) : void
value int
return void
        public void PointerMethodReturn(int value)
        {
            var obj = new PointerHolder();
            MethodInfo method = typeof(PointerHolder).GetMethod("Return");
            object actualValue = method.Invoke(obj, new object[] { value });
            Assert.IsType<Pointer>(actualValue);
            void* actualPointer = Pointer.Unbox(actualValue);
            Assert.Equal(value, (int)actualPointer);
        }