📜  时间跨度到整数 c# 代码示例

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

代码示例1
private void dateTimePicker4_ValueChanged(object sender, EventArgs e)
    {
        TimeSpan t = dateTimePicker4.Value.ToLocalTime() - dateTimePicker3.Value.ToLocalTime();
        int x = int.Parse(t.Minutes.ToString());
        y = x;
    }