Skip to content

4. Reflection helpers

SomeRandomNoobKekeke edited this page Apr 26, 2026 · 1 revision

Every c# object has _Get() and _Set() reflection helpers, they return ReflectionGetter and ReflectionSetter and can access private stuff

ReflectionGetter

  • Type = obj.GetType()
  • FieldInfo(string name)
  • Field(string name) - value of a field
  • PropertyInfo(string name)
  • Property(string name) - value of a property
  • MethodInfo(string name, params Type[] paramTypes)
  • ConstructorInfo(string name, params Type[] paramTypes) - without paramTypes just returns the first constructor

ReflectionSetter

  • Field(string name, object value) - sets value of a field
  • Property(string name, object value) - sets value of a property

Clone this wiki locally