I found out that the "C#" that runs on Unity is not the same as the "C#" that Microsoft documents.
But it is. The language is exactly the same. You will even use a lot of the .NET core classes like String or List. The main difference is that you might be interacting with different APIs.
When you wonder if you should post on Gamedev.SE or Stackoverflow, then you should ask yourself this question: "is it a question which any C# programmer can answer, or is it something you can only answer if you have experience with Unity?".
I needed to sort an array
Sorting arrays is something every developer needs to do once in a while, no matter if they develop games, office tools, web applications or telemetry software for space probes. And no matter in which of these industries you work, if you use C#, you would do it roughly the same way. So this is a question you would ask on stackoverflow (although it would really surprise me if you manage to come up with a question about sorting in C# which isn't already answered on stackoverflow)
and I have some questions about the Unity API.
Now that's a question you would rather ask on Gamedev.SE, because Unity is (almost) exclusively used by game developers. If you are a game developer too, you will likely get a better answer on Gamedev.SE.