Is DateTime.ParseExact() faster than DateTime.Parse()

前端 未结 2 1435
后悔当初
后悔当初 2021-02-19 22:29

I would like to know if ParseExact is faster than Parse.

I think that it should be ParseExact since you already gave the format but I also think all the checking for the

2条回答
  •  长情又很酷
    2021-02-19 22:45

    You are asking for the difference in speed for two methods that are functionally different (close but still different).

    Just pick the one that is most appropriate.

    And no, performance of library methods is almost never documented.

    But I can tell you something about that difference:

    • it is small,
    • it might change in future versions

提交回复
热议问题