コード例 #1
0
        public void ValidatedBissextYear()
        {
            //Output 29/02/2016 17:00
            datetime = DateTime.Parse("28/02/2016 17:00");
            string microsoft_result = datetime.AddHours(24).ToString("dd/MM/yyyy HH:mm");
            string new_datetime     = my_datetime.AddHours("28/02/2016 17:00", 24);
            string my_result        = my_datetime.Format(new_datetime, 1);

            Assert.AreEqual(microsoft_result, my_result);
        }
コード例 #2
0
        /// <summary>
        /// Prints the data on a particular Test
        /// </summary>
        /// <returns>string str - contains the details of the Test</returns>
        public override string ToString()
        {
            string str = "";

            str += "tester id:" + TesterId + '\n' + "trainee id:" + TraineeId + '\n' + "date:" + Datetime.AddHours(Hour) + "\n" + "address:" + '\n' + SourceAddress + '\n' + "Grade:" + Grade;
            if (Note != "")
            {
                str += '\n' + "Note:" + '\n' + Note;
            }
            return(str);
        }