I have a drop down that has the years basically 2011,2010,2009 etc… and there is a date that i need to append the year selected to, basically I want to check todays date
DateTime dt = DateTime.Today;
and then change the year of dt to the value selected of my drop down
dt.Year = ddlMyYear.SelectedValue; but this does not work, not sure how to do this..
Thank you
DateTimeis immutable.Instead, you can write