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

PointerPropertySetValue_InvalidType() private method

private PointerPropertySetValue_InvalidType ( int value ) : void
value int
return void
        public void PointerPropertySetValue_InvalidType(int value)
        {
            var obj = new PointerHolder();
            PropertyInfo property = typeof(PointerHolder).GetProperty("Property");
            Assert.Throws<ArgumentException>(() =>
            {
                property.SetValue(obj, Pointer.Box((void*)value, typeof(long*)));
            });
        }