Interview Question asked to me in an interview.
What will be the output of the below program ?
using System;
using System.Collections.Generic;
using System.Linq;
namespace LinqDetails
{
class Program
{
static void Main(string[] args)
{
DateTime dt = Convert.ToDateTime("9/2/2016");
dt.AddDays(1);
Console.WriteLine(dt);
Console.ReadLine();
}
}
}
Because DateTime is immutable. :)
