在ASP.NET MVC RC3中使用Razor - @ String.Format("{0:hh:mm:ss}",timespan)错误 - 错误?

Kei*_*ill 4 asp.net-mvc razor asp.net-mvc-3

FormatException出现以下错误:

<td class="numeric">@String.Format("{0:hh:mm:ss}", testrun.ExecutionTime)</td>
Run Code Online (Sandbox Code Playgroud)

ExecutionTimeTimeSpan 在哪里?此格式字符串有效.这是一个错误还是我错过了一些明显的东西(考虑到时间已晚 - 后者可能是它).

Dar*_*rov 10

试着逃避 :

String.Format("{0:hh\\:mm\\:ss}", testrun.ExecutionTime)
Run Code Online (Sandbox Code Playgroud)