Wednesday, 21 November 2012

DateTimes in C#

A few weeks ago I was working on getting the beginning and end of the week for any given DateTime.
This would've been easy if I realized that the AddDays function of the .NET DateTime actually returned a new DateTime.
I spent a full morning pragmatically working out which month/day/date it was and when.

Once I realized this I re-wrote my code in about 1 minute. Only slowed down by typing speed.
Anyway I hope this is something that you all find useful to know.

1 comment:

  1. Wonderful goods from you, man. I've take note your stuff previous to and you're just extremely excellent.
    I actually like what you've obtained here, really like what you're stating and the way in which in which you assert it.
    You make it entertaining and you still take care of to keep it smart.

    I can't wait to read much more from you. This is actually a tremendous website.

    My webpage; www.cathedral.cork.anglican.org

    ReplyDelete

Please leave a comment if you've found this tutorial helpful or if you're facing any problems and I will endeavour to assist you.