mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-24 18:28:38 -10:00
ArrayList.ToArray(Type) has to lookup the array type in the type loader structures. It makes it slow and potentially AOT unfriendly since the code required to support the array type may not exist. Convert most uses of ArrayList.ToArray in libraries to use List<T> if possible, or ArrayList.CopyTo if the conversion to List<T> was not straightforward. Simplified a few other places that created arrays while I was on it.