GetDateTime() public méthode

public GetDateTime ( Date date ) : System.DateTime
date Date
Résultat System.DateTime
Exemple #1
0
        public void GetEmptyDateTimeTest()
        {
            DateTime dateTime = new DateTime( 2009, 7, 22 );
            Time time = new Time();

            Assert.AreEqual( time.GetDateTime( dateTime ), dateTime );
        }
Exemple #2
0
        public void GetDateTimeTest()
        {
            DateTime dateTime = new DateTime( 2009, 7, 22 );
            TimeSpan timeSpan = new TimeSpan( 0, 18, 23, 56, 344 );
            Time time = new Time( timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds );

            Assert.AreEqual( time.GetDateTime( dateTime ), dateTime.Add( timeSpan ) );
        }