djordan (6) [Avatar] Offline
#1
Hi,

On p. 105, in the section Where Contravariance Would Be Useful there is an indication that there is extra code available for the example using the ComparisonHelper class.

I can't find it on the Web site. I would be grateful if someone could point me in the right direction.

Thanks

Dave
jon.skeet (448) [Avatar] Offline
#2
Re: Can't locate code sample
It's very possible that the "extra code" doesn't exist yet, I'm afraid. Oops!

I need to update the sample source code anyway to work with the released Entity Framework and the latest CTP of Parallel Extensions. I'll try to do that tonight and also include a sample for ComparisonHelper. Apologies for this!

Jon
djordan (6) [Avatar] Offline
#3
Re: Can't locate code sample
Thanks for the quick response.

Dave.

By the way, Hats off Sir! C# in Depth is a fabulous book.
jon.skeet (448) [Avatar] Offline
#4
Re: Can't locate code sample
> Thanks for the quick response.

No problem - I'm just embarrassed that the book didn't deliver everything it was meant to smilie

If you go to the downloads page (http://csharpindepth.com/Downloads.aspx) and download the full source, you'll find examples in OtherChapters/Chapter3/Variance. There's shape sorting (P105), the generic IStorageLocation (P104) and the conversion methods for IEnumerable/IEnumerator (bottom of P105).

> By the way, Hats off Sir! C# in Depth is a fabulous book.

You're too kind smilie Seriously, I'm really glad you're enjoying it.
Of course, if you were to write an Amazon review, that would be even kinder smilie

Jon