c# - 日期时间格式问题

标签 c# .net

为什么在提供明确的日期格式时将斜杠更改为破折号(下图)?

enter image description here

最佳答案

因为斜杠代表特定于语言环境的日期分隔符。要显式插入斜杠,您需要对其进行转义。查看documentation

关于c# - 日期时间格式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5559073/

相关文章:

.net - Linq 2 实体 : Performing a join on two columns with different types

.net - 如何让 dotTrace ConsoleProfiler 收集快照?

c# - LINQ - 'The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to ' GroupJoin'。

c# - Entity Framework : Precompiled Query for Enumerable. 包含

c# - 通过表达式树构建表达式列表

C# 7 ValueTuple 编译错误

.net - 在哪里可以找到在 .NET 中开发的 Windows 服务生命周期的详细 View ?

c# - SemanticZoom ZoomedOutView SelectedItems 返回 DependencyObject

c# - DataGridTemplateColumn Visibility Hidden 为什么不为列分配空间?

c# - 将列表转换为纯字符串,就像字符串模式一样