コード例 #1
0
        public static void SetValueDirect_GetValueDirectRoundDataTest(object value)
        {
            FieldData testField = new FieldData {
                field = -1
            };

            FieldInfo      info      = testField.GetType().GetField("field");
            TypedReference reference = __makeref(testField);

            info.SetValueDirect(reference, value);
            object result = info.GetValueDirect(reference);

            Assert.Equal(value, result);
        }