Como funciona o IOrderedEnumerable.ThenBy () no .net?

Eu quero entender como ThenBy trabalha em .net. (Eu sei como usá-lo, eu simplesmente não entendo como a Microsoft o implementou!)

De acordo com a documentação,string_list.OrderBy(Function (x) x.length).ThenBy(Function (x) x) deve produzir uma lista de strings ordenadas por comprimentoe depois alfabeticamente. Como isso poderia funcionar?!? O primeiro tipo é por comprimento. O segundo tipo deve desfazer a classificação do primeiro!

Assuma este código:

Dim sorted_by_length As IOrderedEnumerable(Of String)
sorted_by_length = string_list.OrderBy(Function (x) x.length)
sorted_by_length = sorted_by_length.ThenBy(Function

Aqui está eu tentando implementar a última linha sem usarThenBy:

Dim sorted_by_length As IOrderedEnumerable(Of String)
sorted_by_length = string_list.OrderBy(Function (x) x.length)
'my implementation of OrderBy:
Dim e as IEnumerator(Of String) = sorted_by_length.GetEnumerator
Do While e.MoveNext
    'I have no idea what to write here!
Loop

Há alguma mágica acontecendo aqui ... Existe alguma função e.GetPreviousKeySelector ()? Na verdade, eu não posso nem escrever uma função que retorne IOrderedEnumerable!

questionAnswers(1)

yourAnswerToTheQuestion