These listing show the code samples from the book as printed with minor corrections put in place. In places where expanded samples are alluded to, those will come from the upcoming conversion of the "full listings" that Ryan rewrote for the website exclusively. We did not attempt to merge those into these samples yet. Sorry.
In most cases in the book, we used the VB.NET "Using" statement to substitute for the C# "using" statement. This means that the sample as shown will not compile in VB.NET 1.x, as the Using statement is new to .NET 2.0. Sorry about that too. It was too awkward to rewrite the ones that would otherwise work the same in .NET 1.x with the 1.x syntax. If you need to do that, replace:
Using (xxx)
End Using
...with this:
Try
xxxx
Finally
If Not (xxxx Is Nothing) AndAlso TypeOf(xxxx) Is IDisposable Then
Dim id As IDisposable = DirectCast(xxxx, IDisposable)
xxxx.Dispose()
End If
End Try
In some cases, C# using statements were refactored to as the usage restrictions in VB.NET for inline declarations are more restrictive.
I checked the vast majority of the samples to see if they would compile when put in a valid code block, but did not check them for functionality. They should work as well as the C# ones do.
All feedback on these and other topics should go to the website forums.
Thanks!
Joe