https://learn.microsoft.com/en-us/dotnet/api/system.reflection.reflectioncontext.gettypeforobject?view=netframework-4.8.1&viewFallbackFrom=net-10.0-pp
ReflectionContext.GetTypeForObject(Object) Method (System.Reflection) | Microsoft Learn
Gets the representation of the type of the specified object in this reflection context.
objectmethodsystemreflectionmicrosoft