Milliseconds in DateTime.Now on .NET Compact Framework always zero?

前端 未结 4 2004
情话喂你
情话喂你 2021-02-19 11:28

i want to have a time stamp for logs on a Windows Mobile project. The accuracy must be in the range a hundred milliseconds at least.

Ho

4条回答
  •  醉梦人生
    2021-02-19 12:13

    In regular framework v2.0 you may use DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") to get miliseconds. More f means more precision.

提交回复
热议问题