Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はいくつかの配列を持っています
「00:00:00」
「00:02:00」
「00:07:02」
AZ のように並べ替える最良の方法はどれですか?
ありがとう!!!
私はデータ型がaTimeSpanであると推測しています。その場合、使用できます
TimeSpan
var sortedArray = myArray.OrderBy(TimeSpan.Parse);
私は怠惰なので、おそらくそのようになります:
string[] array = new string[] { "00:03:00", "00:00:00" }; Array.Sort(array);