📜  c# hardcode datetime quoting - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:42.089000             🧑  作者: Mango

代码示例1
var yearInt = 2012;
var monthInt = 01;
var dayInt = 01;
var hourInt = 17; //24hr clock
var minuteInt = 45;
var secondInt = 59;

DateTime hardcodeValue = new DateTime(yearInt, monthInt, dayInt, hourInt, minuteInt, secondInt);