This might be too primitive, but for my use case, I need to maintain an array in which two attributes are linked to each other... For example - If I want to do Score gathering... Then I need an array which has scores and corresponding player names as each element.
So, when I do Array.Sort(PlayerScorearray)
I even need the playername to be sorted in the order so that if I want to know the player with lowest score, I just go for the first element and then go to the corresponding player name.. Is it possible to do it in a simpler way? My mind can't think of a simple way to do this.
Edit : I am using C# for scripts
Sort
method accepts an instance of a class implementing theIComparer
interface, so you can define your own compare method see here \$\endgroup\$