The following code listings are all copy-and-paste friendly.
Code Listings for C# 5.0/6.0 in a Nutshell
NB: All code listings for Chapters 2-10, 14, 20, 22, 23 and 26 are available as interactive samples in LINQPad.
Go to LINQPad's samples tree view (bottom left) and click Download more samples to get all of the above chapters.
Code Listings for C# 4.0 in a Nutshell
Code from chapters 2-10, 19, 22 and 26 is available within LINQPad.
Code Listings for C# 3.0 in a Nutshell
Download all as zip file