How to add a first date in given Month?

 Posted by vishalneeraj-24503 on 12/1/2014 | Category: Visual Studio Interview questions | Views: 1224 | Points: 40

Just write below code:-
DateTime dt;

dt = new DateTime(dt.Year, dt.Month, 1);

Output would be 1st december.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response