How to use Array.sort to sort an array of structs, by a specific element

Viewed 21258

Simple, I have a struct like this:

struct bla{
  string name;
  float depth;
}

I have an bla array, and I want to sort by depth, being the greatest depth first. What should the delegate do/return? I cant find any concrete example.

3 Answers
Related