Thanks for pointing out the case sensitivity. I'm using it to sort listboxes and structs alphabetically and never experienced problems, but then all my Strings started with a capital letter. So I guess I should actually use "String.LowerCase()" inside the compare function to be on the safe side.