2. maart 2013 10:05 by martijn in
An elegant solution is so simple that something seems to be missing. I had that feeling when I found this solution of taking a random subset of a set of items:
public static IEnumerable<T> TakeRandom<T>(this IEnumerable<T> list, int count)
{
var shuffledList = list.OrderBy(l => Guid.NewGuid());
return shuffledList.Take(count);
}
27. september 2012 13:02 by martijn in
Build succeeded run...fail. It annoys me that I use a TYPE SAFE language like C#, use ASP.NET with ItemType (strongly typed stuff) and still get runtime errors. So I have to click through every page when I refactor?
Luckily compiling the views can be done by adding a afterbuild or using a postbuild event. Here what you paste in your afterbuild event to get the aspx compiling :
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe -v /-p "$(SolutionDir)$(ProjectName)"