.net 3.5で解決策を探しています。次の実用的な解決策を書きました:
private string FormatTimeSpan(TimeSpan time)
{
return String.Format("{0}{1:00}:{2:00}", time < TimeSpan.Zero ? "-" : "", Math.Abs(time.Minutes), Math.Abs(time.Seconds));
}
しかし、私の質問は次のとおりです。より良い方法はありますか?ヘルパー関数を必要としない短いものかもしれません。