Errata


Print Print Icon

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



Version Location Description Submitted By
Printed Page 64
in the book does not have any calls to the Method ShowIncSalary. How do the

results get printed in the message box?

Anonymous 
Printed Page 83
Table 5.4

This is NOT a listing of System.String, rather it is a listing of Microsoft.VisualBasic.Strings. That is why the String.Insert method you correctly demonstrate in the example above does not appear in the table.

You guys had me worried :-)

Anonymous 
Printed Page 83
LTrim description

The LTrim description talks about the ME operator and this has no relevance to the LTrim function.

Anonymous 
Printed Page 86
Example at top of page

The output is NOT "To be or not." it is " To be or not" ie there is a leading space and no final period.

You could always get the printed answer by changing the last line of the example to:-
MsgBox(s.TrimStart(Nothing) & ".")
but I think it might be easier to change the answer!

Sorry to be a boring old pedant :-)

Anonymous 
Printed Page 105
2nd paragraph

this code:

Try
Dim s, d As String
s = "c: emp.txt"
'Try to copy a file to a nonvalid target
'FileCopy function simply copies a file
FileCopy(s, d)
Catch TheException As ArgumentException
MsgBox(TheException.Message & ", " & Exception.ParamName)

End Try

Retrun an empty string for the ParamName

Anonymous 
Printed Page 225
Table at Top

A string that is not explicitly initialised by the Dim statement is intialised to Nothing, not to the zero length string as stated in the table. This example shows how VB.NET tries to hide the difference between these string types, but, when the chips are down they are semantically very different:

Option Strict On
Imports System.Console
Module Module1
Sub Main()
Dim s0 As String = ""
Dim s1 As String
Try
WriteLine(s0 = s1) 'Prints True
WriteLine(s0.Length) 'Prints 0
WriteLine(s1.Length) 'Throws System.NullReferenceException
Catch ex As Exception
WriteLine(ex)
End Try
ReadLine()
End Sub
End Module

Anonymous 
Printed Page 308
1st para of programming tips and gotchas

The first line of the example here is:
If IsNull(rsMyRecordSet!Value) then

There is nothing wrong with this line but your book contains nothing about the ! operator

Anonymous 
Printed Page 523
Final paragraph

The description of ParamArray here and in the VB6/VB.NET references on page 525 is wrong. The ByVal keyword must be present and when option strict is on the array type must be specified.

The description of ParamArray on page 46 is almost correct, though the ByVal should preceded the ParamAway keyword in the function declaration that starts the example.

Anonymous 
Printed Page 551
last bullet point

The statement that it's confusing to compare the result to a member of the FirstDayOfWeek
function seems rather silly. This Enum is intended for specifying which day is regarded
as the first day of the week. The result of Weekday is an integer, at least 1 and at
most 7, representing the position of a given date in the week. The result 1 means "first
day of the week", NOT "Monday". So the example at the top of page 552 should say:
"If 2 = Weekday(<some date>, FirstDayOfWeek.Monday) Then" (arguably you should scrap
the If and Then if you're serving up an expression that "returns True for Tuesday" The
fact that this returns True when the date's a Tuesday is then no surprise at all. The
example given makes as much sense as comparing the result to MsgBoxStyle.OKCancel - the
result is the same, but the name of the constant/enum member used causes unnecessary
confusion.

If you want to compare the result to an Enum member, you need an Enum like
Enum DayPositions
FirstDayOfWeek = 1
SecondDayOfWeek = 2
etc.

Question while on this topic. There's no comment about what WeekdayName returns in
non-English-speaking locales. Presumably, it dishes up a local translation?

Anonymous 
Printed Page 581
Table of Clipboard

You wrote

Clipboard.GetDataObject -> Places data on the Clipboard
Clipboard.SetDataObject -> Retrieves an IDataObject...

but it must be

Clipboard.GetDataObject -> Retrieves an IDataObject...
Clipboard.SetDataObject -> Places data on the Clipboard

Anonymous 
Printed Page 594
Stuff missing from Chapter

The GetType operator has been omitted along with AndAlso, OrElse and the Dictionary Member Access operator (!).

Anonymous 
Printed Page 598
Final paragaph + page 599

The description of the And and Or operators is wrong since it fails to take into account the introduction of the short-circuiting AndAlso and OrElse operators introduced in Beta 2.

See Visual Basic Language Concepts/Boolean Expressions,
Visual Basic Language Reference/OrElse operator,
Visual Basic Language Reference/AndAlso operator
from the Visual Studio Integration Partner Collection of documentation supported by Beta2 Microsoft Document Explorer.

I am surprised these operations are omitted when the book has kept up with Beta2 changes in the Array and boolean conversion areas.

Anonymous