Errata

Programming Visual Basic .NET

Errata for Programming 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 176
Output: The Employee array...

When the code of Example 9-2

Console.WriteLine(ControlChar.Lf + "The Employee array...")
For i = 0 To empArray.Length - 1
Console.WriteLine(emp(i).ToString())
Next i

The For loop will execute 4 times producing the output

The Employee array...
5
6
7
8 <- missing element in book

Anonymous   
Printed Page 178
Output: The Employee array...

When the code of Example 9-3

Console.WriteLine(ControlChar.Lf + "The Employee array...")
Dim e As Employee
For Each e In empArray
Console.WriteLine(e)
Next

The For Each loop will execute 4 times producing the output

The Employee array...
5
6
7
8 <- missing element in book

Anonymous   
Printed Page 181
Tip section

In the tip section it is said that integer elements in myintarray( declared under "declaring array" topic) are value value types, allocated on the stack.

array contains value types elements directly which means value types elements of array are not allocated on stack, they are on the heap

Nikhil Kumar  Feb 22, 2020 
Printed Page 215
Example 9-14

When assigning the collection item to emp, I believe you need to convert the
collection item to type Employee, i.e.

emp = empCollection2.Item("John Adams")
becomes
emp = CType(empCollection2.Item("John Adams"), Employee)

and
emp = empCollection2.Item(1)
becomes
emp = CType(empCollection2.Item(1), Employee)

This prevents the following error

"Option Strict On disallows implicit conversions from 'System.Object'to
'CollectionDemo.Employee'."

Anonymous   
Printed Page 225
2nd paragraph from the last

The output followed the statement: "This copies the four values..."
did miss the value of the last element of the stack inStack, which is the value of
zero(0).

Anonymous   
Printed Page 250
next to last paragraph

Dim string1 As String = "04:03:27 127.0.0.0 LibertyAssociates.com " +
"04:03:28 127.0.0.0 foo.com " +
"04:03:29 127.0.0.0 bar.com " ;

will not work in VB; looks like c# code.

Needs to be reworked to:
Dim string1 As String = "04:03:27 127.0.0.0 LibertyAssociates.com " + _
"04:03:28 127.0.0.0 foo.com " + _
"04:03:29 127.0.0.0 bar.com "

or

Dim string1 As String = "04:03:27 127.0.0.0 LibertyAssociates.com " & _
"04:03:28 127.0.0.0 foo.com " & _
"04:03:29 127.0.0.0 bar.com "

Anonymous   
Printed Page 322
Third line from the bottom

I believe that the subroutine name is missing an underscore character i.e. instead of
btnCancelClick it should read btnCancel_Click.
This error seems to recurr throughout this particular example (13-3) for the button
click events.

Anonymous   
Printed Page 453
Example 18-2

Option Strict on does not permit implicit conversion of 1-dimensional array of type
Object to a 1-dimensional array of type Attribute for the following code snippet:

Dim attributes() As Attribute
attributes = inf.GetCustomAttributes(GetType(BugFixAttribute),False)

'-----------------------
Code snippet should be:
Dim attributes() as Object
attributes = _
CType(inf.GetCustomAttributes(GetType(BugFixAttribute), False), Attribute())

Anonymous