What is the output of dt variable in below code?

Dim dt As Date = DateAdd(DateInterval.Year,1,Date.Now())

 Posted by vishalneeraj-24503 on 12/24/2013 | Category: VB.NET Interview questions | Views: 1871 | Points: 40

Output would be 12/24/2014 2:33:08 PM.

As we have supplied DateInterval.Year Enum value,so it will add 1 year in current year,that will be 2014.
And also as Date.Now() means current date and time.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response