3 ms·
> However for .NET, since you can use reflection to load any type in an assembly and call any method dynamically, removing a method is isn't statically called c
by SideburnsOfDoom 9y ago
> However for .NET, since you can use reflection to load any type in an assembly and call any method dynamically, removing a method is isn't statically called could cause you to fail at runtime.
Indeed. it's not that common, but I would expect it to happen. One example is that many IoC Containers allow you to scan assemblies and register all class + interface pairs that match given rules.
There has to be some safety-hatch to express "yes, I really want to keep that class and its methods. Don't strip them out".
This seems to be documented here: https://github.com/dotnet/core/blob/master/samples/linker-instructions-advanced.md#limitations https://github.com/dotnet/core/blob/master/samples/linker-in...