Sort an array of structures in .NET

前端 未结 7 1225
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 07:02

This is one of those times when only the hive mind can help - no amount of Google-fu can!

I have an array of structures:

Structure stCar 
    Dim Nam         


        
7条回答
  •  天命终不由人
    2020-12-16 07:26

    The easiest way to perform the sort would be to use LINQ to Objects.

    Dim q = From c In cars Order By c.MPH Select c
    

提交回复
热议问题