In the Part 1 the layouts of:
1. System.Object
2. T[] array
3. string
This article also reveals how to access those types in unsafe or unmanaged environment. How we can change the object type or get array/string length pointer to change it later.
In the Part 1 the layouts of:
1. System.Object
2. T[] array
3. string
This article also reveals how to access those types in unsafe or unmanaged environment. How we can change the object type or get array/string length pointer to change it later.
When you want to have single DLL which works in all .NET runtimes (Mono/IL2CPP/NETFX/NETCore), it’s crucial to detect which runtime you are currently in. While there are some dynamic methods, like query runtime name and check it for “Mono” string, it’s not the best approach, and definitely not the performant one.