Have you ever wanted to use System.Array.Sort in your UdonSharp project and ran into this error message?

Unity error message

Your code probably looked something like this:

var myArray = new int[] { 1, 2, 3 };
System.Array.Sort(myArray);

The error stems from the fact that C# by default assumes you are using Array.Sort<T>(T[]), NOT Array.Sort(Array), the former of which is not exposed to Udon.

To fix this issue, simply upcast your array to System.Array explicitly before calling Sort:

var myArray = new int[] { 1, 2, 3 };
System.Array.Sort((System.Array)myArray);