Diff<>(old, new, comparer, predicate, postProcessor) NewArray<>(size1, size2, size3, initialiser) RunMain(main, onUnhandledMain, onUnhandledThread) RunMain(main, onUnhandledMain, onUnhandledThread)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Extension method: T GetFieldValue<T>(this object, string)Declarationpublic static T GetFieldValue<T>(
this object instance,
string fieldName
) SummarySearches the specified object’s type for a field of the specified name and returns that field’s value. Generic type parametersT | Expected type of the field. |
Parametersthis object | instance | Instance from which to retrieve the field value. | string | fieldName | Name of the field to return the value of. |
ReturnsThe value of the field. Exceptions- System.InvalidOperationException
- The field is of a different type than specified.
- There is no field with the specified name.
RemarksThis method is intended to be used only for debugging. Do not rely on it in production code. |