C# - DateTime Constructor Call

后端 未结 2 1484
被撕碎了的回忆
被撕碎了的回忆 2021-01-29 13:01

So, I have this program that has a constructor with the inputs as DateTime.

But whenever I try to create the object of that Class, and pass the DateTime as argument, the

2条回答
  •  一向
    一向 (楼主)
    2021-01-29 13:34

    Your class takes a DateTime as a argument, not three integers. Try this:

    var myprogram = new Student(new DateTime(1995,04,29));
    

提交回复
热议问题