by Luc Pattyn
The code snippet below returns the first Thursday of a given year without iterating anything.DateTime FirstThursday(int year) { DateTime dt=new DateTime(year, 1, 1); return dt.AddDays((11-(int)dt.DayOfWeek)%7);}The formula used may seem a bit bizarre, it computes the distance...
by jfriedman
Obtaining microsecond precision using .NET without Platform Invoke.
by Tomer Shamam
Blendability Part I – Design time ViewModel
by Tomer Shamam
Blendability Part II – Design time support for Prism
by jfriedman
Obtaining microsecond precision using .NET without Platform Invoke.
by dotted_decimal
Extension method that defines a format specifier q or Q and finds the Quarter for a DateTime value
by danielthesolver
The cardinality of a collection A (which might be an ordered or unordered list, a set, or what not) is basically the number of unique values in A. For example, the collections [1,2,3,4] and [1,2,1,3,1,4,3] have the same cardinality of 4 (and also correspond to … Continue reading →
by xibao
Code to produce holidays for NYC Stock Exchange.