Errata

Learning Visual Basic .NET

Errata for Learning Visual Basic .NET

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 25
Figure 4-1

Figure 4-1 should show the Start Page of Visual Studio, but shows the New Project window instead (which is repeated in figure 4-2.)

Anonymous   
Printed Page 81
under output

Each child wasts 35 minutes

Should be:

Each child wastes 35 minutes

thumb10.40  Aug 12, 2009 
Printed Page 88-89
Example 8-2

To be honest, I'm not sure. When I attempted to code as described beginning on page 88, the compiler complains " 'Sub Main' was not found in Module1.Module1" Here is my actual code; I commented out any non-essential items before last compile attempt. My project name is Module1 and is a VB .Net Console application:

Option Strict On
Imports System
Public Module Module1
Public Class Dog
End Class
Public Class Tester
Public Shared Sub Main()
End Sub
Public Sub Run()
End Sub
End Class
End Module

Anonymous   
Printed Page 94
first paragraph (after table)

This paragraph states that "In Example 8-3, DisplayCurrentTime() was invoked from a method of Tester" but in Fig. 8-3 there does not appear to be anything named Tester. It appears that the sentence should refer to Module1 instead.

thumb10.40  Aug 13, 2009 
Printed Page 94
3rd sentence on the page

"In Example 8-3, DisplayCurrentTime() was invoked from a method of Tester (not Time), and this was legal because both the class (Time) and the method (DisplayCurrentTime) were marked public."

I do not see a Tester class defined in Example 8-3 (p. 92). I suppose the lesson to take from this, since the compiler puts the module into a class anyway, is that it is that object that calls the Time object's method?

Jeremy Marston  Jan 20, 2010 
Printed Page 97, 99 and 100
Example 8-5, Example 8-6 and Example 8-7

All three of these examples declare 'date' for example:
Private Date As Integer
The compiler gives an error message:
Error 30183: Keyword is is not valid as an identifier

Also in example 9-1 and 9-2

Anonymous   
Printed Page 182
where it is stated that you can redim an array with the statement

ReDim Preserve myArray(myArray(Ubound) + 50)
it should be:
ReDim Preserve myArray(Ubound(myArray) + 50)

Anonymous   
Printed Page 203
Example 14-10

code example generates the following error when compiled:

"(15) : error BC30451: Name 'initialStrings' is not declared

unless you declare the constructor for the initialStrings() array constructor as
follows:

Dim initialStrings() As String = New String() {}

**I inserted this statement after the following line of code:

Private ctr As Integer = 0

The source compiles without error and generates the correct output afterwords.

Anonymous   
Printed Page 203
Example 14-10

Referencing the previous post, Example 14-10 did compile for me as listed. Declaring ParamArray beforehand will work but it is redundant since the array is declared in the constructor's signature: (ByVal ParamArray initialStrings() As String)

That was my experience. . .

Anonymous  Feb 16, 2010 
Printed Page 203
Example 14-10

*Corrected version of the similar post I wrote:

Referencing the previous post, Example 14-10 did compile for me as listed. Declaring initialStrings beforehand will work but it is redundant since the array is declared in the constructor's signature: (ByVal ParamArray initialStrings() As String)

That was my experience. . .

Jeremy Marston  Feb 16, 2010