January 2008 Entries

Example: how to sort and get top iNumOfRecords from a DataTable, using a DataView

DataView dvSortTotalUpdates = new DataView(); dvSortTotalUpdates = dtAllUpdates.DefaultView; dvSortTotalUpdates.Sort = "UploadDate"; DataTable dtGetBySize = dtAllUpdates.Clone(); for( int i = 0; i < iNumOfRecords; i++ ) { dtGetBySize.ImportRow(dvSor... } return (dtGetBySize);...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Using a MemoryStream with GZipStream

This is a very subtle yet annoying bug. And it's hard to find. Fortunately, I found help on the BCL Team Blog. Just in case (I've had posts that I linked to disappear in the past) I'll copy here what they say: We’ve seen cases where our customers have run into issues when using a MemoryStream with GZip compression. The problem can be frustrating to debug and I thought I’ll blog about it in the hope that others would avoid a similar issue. The code for this looks like this; Byte[] compressedBuffer;...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

«January»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789