Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ SetValue() [1/5]

override void System.Reflection.RuntimePropertyInfo.SetValue ( object obj,
object value,
BindingFlags invokeAttr,
Binder binder,
object[] index,
CultureInfo culture )
inline

Definition at line 306 of file RuntimePropertyInfo.cs.

307 {
308 RuntimeMethodInfo setMethod = GetSetMethod(nonPublic: true);
309 if (setMethod == null)
310 {
311 throw new ArgumentException(SR.Arg_SetMethNotFnd);
312 }
313 if (index == null)
314 {
315 setMethod.InvokeOneParameter(obj, invokeAttr, binder, value, culture);
316 return;
317 }
318 object[] array = new object[index.Length + 1];
319 for (int i = 0; i < index.Length; i++)
320 {
321 array[i] = index[i];
322 }
323 array[index.Length] = value;
325 }

References System.SR.Arg_SetMethNotFnd, System.array, System.culture, System.Reflection.PropertyInfo.GetSetMethod(), System.index, System.obj, and System.value.