Course Catalog
Curriculum Guides
  .NET
  Java/J2EE
  XML
Downloads
Buy Courseware
Customization
News
Authors
Technical Library
FAQ
About Object Innovations
Opportunities
Contact Us
Home

 

 

   
www.objectinnovations.com
info@objectinnovations.com
877-558-7246 (toll free)  
781-466-8012  


Errata and Enhancements
for
Introduction to C# Using .NET



Introduction to C# Using .NET
ISBN: 0-13-041801-3
by Robert J. Oberg
Copyright © 2002 by Robert J. Oberg
Published by Prentice Hall PTR
Prentice-Hall, Inc.
Upper Saddle River, NJ 07458


Please send any errata you discover or enhancements you would like to suggest to:

    oberg@objectinnovations.com.

Please download the latest version of the complete code file, or you may download an update file that installs over a previous version.


Missing pages 364-365. Some copies of the book were printed missing pages 364 and 365. You may download a zip file containing a PDF file for these mising pages.


p. 7 The download code file is a zip file, not a self-extractor (to avoid problems with an .EXE download being blocked)


p. 103 The code reads on the fourth line

int a[] = {2, 3, 5, 7, 11}; That should be
int [] a = {2, 3, 5, 7, 11};

p. 146 Several other differences between classes and structures should be mentioned here. Unlike classes:
  1. Structures cannot have a parameterless (or default) constructor.
  2. Structures cannot have a default field initializer.
  3. Structures cannot be derived from other structures.

p. 148 The second to last sentence of the first paragraph should read: "The structure definition ..." instead of "The class definition ..."


p. 159 Line 10 of the code listing TestReferenceMath.cs should read

ReferenceMath.Calculate(5, 7, ref sum, ref product);


p. 162 The second sentence of the second paragraph of the METHOD OVERLOADING section should read: "That is, different methods can have the same name, if they have different signatures."


p. 191 The code reads on the first line

int [] array = {5, 2, 11, 7, 3}; That should be
int [] a = {5, 2, 11, 7, 3};


p. 323 The interfaces ICollection and IList should be as follows:

interface ICollection : IEnumerable
{
  int Count {get;}
  bool IsSynchronized {get;}
  object SyncRoot {get;}
  void CopyTo(Array array, int index);
}

and

interface IList : ICollection
{
  bool IsReadOnly {get;}
  bool IsFixedSize {get;}
  object this[int index] {get; set;}
  int Add(object value);
  void Clear();
  bool Contains(object value);
  int IndexOf(object value);
  void Insert(int index, object value);
  void Remove(object value);
  void RemoveAt(int index);
}


p. 364 The code file FileDemo.cs is missing one line at line 26.

if (cmd.Equals("cd"))
{
  path = iw.getString("path: ");
  Directory.SetCurrentDirectory(path);
}

should be

if (cmd.Equals("cd"))
{
  path = iw.getString("path: ");
  dir = new DirectoryInfo(path);
  Directory.SetCurrentDirectory(path);
}

p. 368 The ConsoleThread method is missing a line of code that prints a message when the thread terminates, as illustrated on p. 369. This code was missing on the original download file as well. It is fixed in the update file.

public void ConsoleThread()
{
  for (int i = 0; i < count; i++)
  {
    Console.WriteLine("Thread {0}: ticks = {1}", threadId, ticks);
    Thread.Sleep(delta);
    ticks += delta;
  }
  Console.WriteLine("Thread {0} is terminating", threadId);
}


p. 379 In the last line, SOAPFormatter should instead by SoapFormatter.


p. 387 The output from running the program should not contain the first line shown. The output should begin:

woof, woof!!
assembly name = ReflectionDemo, Version=0.0.0.0, Culture=neutral, PublicKeyToken =null