Append TimeStamp to a File Name

后端 未结 6 763
清歌不尽
清歌不尽 2020-12-07 16:57

I have come across this problem several times in which I would like to have multiple versions of the same file in the same directory. The way I have been doing it using C# i

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-07 17:37

    Perhaps appending DateTime.Now.Ticks instead, is a tiny bit faster since you won't be creating 3 strings and the ticks value will always be unique also.

提交回复
热议问题