Ben.Demystifier
Ben.Demystifier copied to clipboard
only get field value when is delegate
- slight perf improvement. avoid a field getvalue when types dont match and dont unnecessarily trigger a static constructor
- reduces the chance of an exception in a static constructor from bubbling up
found in sentry: Exception Thrown in a Static Constructor Is Not Being Sent To Sentry
@benaadams given a static constructor (triggered by the getfield) could still throw, do you think the get field logic should be wrapped in a try? i would assume a slightly less accurate display name i better than an exception?