Literal four = new Literal();
string timeanddate;
timeanddate = DateTime.UtcNow.ToString();
DateTime dt = new DateTime();
dt = Convert.ToDateTime(timeanddate);
dt.AddHours(3);
four.Text = "3hr added and this gives>> " + dt.ToString();
form1.Controls.Add(four);
它应该添加3到小时但不是,它就像行addhours不存在。