Geeks With Blogs
Solid development Don’t make excuses for code, let it speak for itself October 2009 Entries
Merging sub collections into one collection
Sometimes a LINQ query or other method returns a nested collection but you just want one big collection instead. SelectMany is the answer, see the code below. It can off course also be combined with OrderBy or Distinct if you prefer. List<List<double>> nestedList = new List<List<double>> { new List<double> { 1.2, 2.4 }, new List<double> { 3.6, 4.8 } }; List<double> flatList = nestedList.SelectMany(doubl... => doubleList).ToList(); foreach (double item ......

Posted On Friday, October 30, 2009 3:14 PM

Diagnosing TFS builds
Build fails from some strange reason or build does not perform the things you expect it to do, what to do? Every team build in the TeamBuildTypes folder contains a TFSBuild.rsp file, perform a check out and add the following command argument to it: /v:diag Check the file in and run the build; beware that the log size increases dramatically. The build log contains very detailed information, even the contents of all variables used in the build ......

Posted On Friday, October 30, 2009 3:10 PM

Copyright © martin | Powered by: