Code in books has always been a dilema; what language should we use? For books targetted at a aspecific language it's no problem, but what of books aimed at a technology, such as ASP.NET books. The general consensus is that C# programmers can generally read VB better than VB programmers can read C#. It's a catch-all statement, and obviously doesn't cover everyone, but on the whole it's probably right. Certainly in the ASP.NET community I reckon it's more accurate.
So, the dilema is what to do with code samples. And we're talking samples within the book, not downloadable ones. Do you just sweeping ignore one language? For a generic technology book using on C# would limit your audience as VB people wouldn't buy it, while using VB would deter less people. It's good to see people voicing an opinion on this; a book that puts samples in both languages. While this is great, there are problems. First is I'd feel that if every code sample was in both language the book would feel really fragmented; it would break up the actual content too much. Also for larger samples, such as a page or two long, that would mean four pages of code. I'm not particularly keen on this, although I have to admit I've done it in the past. The other thing is that it increases the cost of the book; more samples means more pages means more costs. Those costs (editing, reviewing, printing) inevitably get passed on to the consumer.
So what's the solution? Well, I don't have one, but I'd sure like to hear your views. I don't dislike the multiple languages scenario, but it depends upon the book. Until we all have electronic books where you can just select a language option (a la MSDN) we're stuck with making a choice. What do you prefer?