Пример #1
0
 // TODO DOC
 public static void SetField(this Type type, string fieldName, object value)
 => At.Internal_SetField(type, fieldName, null, value);
Пример #2
0
 /// <summary>
 /// Helper to set the value of a field.<br/><br/>
 /// If the field is <see langword="private"/>, it must be contained inside the <see cref="Type"/> of <typeparamref name="T"/>.
 /// </summary>
 /// <typeparam name="T">The type which contains the field, can be inherited if not private.</typeparam>
 /// <param name="instance">The instance you want to set the field on</param>
 /// <param name="fieldName">The name of the field to set</param>
 /// <param name="value">The value you want to set on the field</param>
 public static void SetField <T>(this T instance, string fieldName, object value)
 => At.Internal_SetField(typeof(T), fieldName, instance, value);