Skip to main content

Professional C# 2005 with .NET 3.0

Professional C# 2005 with .NET 3.0

Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner

ISBN: 978-0-470-18056-3

Jun 2007

1748 pages

Select type: E-Book

Product not available for purchase

Description

  • Preparing readers to program in C#, this authoritative guide provides the necessary background information on how the .NET architecture works
  • Begins with a tutorial on C# 2005 and the .NET 3.0 Framework, then moves through the vast .NET class library, showing how C# can be used to solve various tasks
  • Includes coverage of the new .NET 3.0 Framework, Generics, ObjectSpaces, .NET 3.0 in SQL Server, ASP.NET 3.0, Windows Communication Foundation, Windows Workflow Foundation, Windows Presentation Foundation, arrays, system transactions, tracing, and event logging
  • Additional coverage includes such topics as writing Windows applications and Windows services, writing Web pages and Web services with ASP.NET 3.0, manipulating XML using C# 2005, and generating graphics using C# 2005
Introduction.

Part I: The C# Language.

Chapter 1: .NET Architecture.

Chapter 2: C# Basics.

Chapter 3: Objects and Types.

Chapter 4: Inheritance.

Chapter 5: Arrays.

Chapter 6: Operators and Casts.

Chapter 7: Delegates and Events.

Chapter 8: Strings and Regular Expressions.

Chapter 9: Generics.

Chapter 10: Collections.

Chapter 11: Memory Management and Pointers.

Chapter 12: Reflection.

Chapter 13: Errors and Exceptions.

Part II: Visual Studio.

Chapter 14: Visual Studio 2005.

Chapter 15: Deployment.

Part III: Base Class Libraries.

Chapter 16: Assemblies.

Chapter 17: Tracing and Events.

Chapter 18: Threading and Synchronization.

Chapter 19: .NET Security.

Chapter 20: Localization.

Chapter 21: Transactions.

Chapter 22: Windows Services.

Chapter 23: COM Interoperability.

Part IV: Data.

Chapter 24: Manipulating Files and the Registry.

Chapter 25: Data Access with .NET.

Chapter 26: Manipulating XML.

Chapter 27: .NET Programming with SQL Server 2005.

Part V: Presentation.

Chapter 28: Windows Forms.

Chapter 29: Viewing .NET Data.

Chapter 30: Graphics with GDI+.

Chapter 31: Windows Presentation Foundation.

Chapter 32: ASP.NET Pages.

Chapter 33: ASP.NET Development.

Chapter 34: ASP.NET AJAX.

Part VI: Communication.

Chapter 35: Accessing the Internet.

Chapter 36: Web Services with ASP.NET.

Chapter 37: .NET Remoting.

Chapter 38: Enterprise Services.

Chapter 39: Message Queuing.

Chapter 40: Windows Communication Foundation.

Chapter 41: Windows Workflow Foundation.

Chapter 42: Directory Services.

Part VII: Additional Information.

Chapter 43: C#, Visual Basic, and C++/CLI.

Chapter 44: Windows Vista.

Chapter 45: Language Integrated Query.

Index.

Code Directory Services
Download
Code Downloads
Download
Code Directory Services
Code Downloads
Code Enterprise Services
Download
Code Interop
Download
Code Localization
Download
Code Messaging
Download
Code Remoting
Download
Code Windows Services
Download
Code Chapter 2
Download
Code Chapter 3
Download
Code Chapter 4
Download
Code Chapter 8
Download
Code Chapter 11
Download
Code Chapter 12
Download
Code Chapter 13
Download
Code Chapter 14
Download
Code Chapter 15
Download
Code Chapter 24
Download
Code Chapter 30
Download
Code Chapter 36
Download
Code
Download
Code .svn
Download
Bonus Chapter: Appendix A - Principles of Object-Oriented Programming
Download the Principles of Object-Oriented Programming bonus chapter in PDF format. To view the file you will need to have Adobe Reader installed.
Download
Bonus Chapter: Appendix B - C# for Visual Basic 6 Developers
Download the C# for Visual Basic 6 Developers bonus chapter in PDF format. To view the file you will need to have Adobe Reader installed.
Download
Bonus Chapter: Appendix C - C# for Java Developers
Download the C# for Java Developers bonus chapter in PDF format. To view the file you will need to have Adobe Reader installed.
Download
Bonus Chapter: Appendix D - C# for C++ Developers
Download the C# for C++ Developers bonus chapter in PDF format. To view the file you will need to have Adobe Reader installed.
Download
Chapter 2 corrected page 44
Download
Code Chapter 32
Download
Code Chapter 33
Download
Code Chapter 34
Download
Code Chapter 36
Download
Code Chapter 5
Download
Code Chapter 7
Download
Code Chapter 9
Download
Code Chapter 10
Download
Code Chapter 16
Download
Code Chapter 17
Download
Code Chapter 18
Download
Code Chapter 19
Download
Code Chapter 20
Download
Code Chapter 21
Download
Code Chapter 22
Download
Code Chapter 23
Download
Code Chapter 27
Download
Code Chapter 31
Download
Code Chapter 37
Download
Code Chapter 38
Download
Code Chapter 39
Download
Code Chapter 40
Download
Code Chapter 42
Download
Code Chapter 44
Download
Code Chapter 45
Download
Code Chapter 27
Download
V4andV5 Code
Download
Code Chapter 26
Download
Code Chapter 28
Download
CourseManagment Database
The database is in the attachment.
Download
ChapterPageDetailsDatePrint Run
xliiiTypo in Code
Mid-page, in code example:
Systm.Collections;

Should be:
System.Collections;
10/29/07

XLIVError in Code
In the first code segment on this page, the word partial is omitted between public and class . From my experiments with the compiler, you cannot attach a partial class definition (as in the second block of code) unless all the definitions include the word partial .
11/21/2007

41Error in Text
in the integer types table:

longt

should be:

long
07/19/2007

44Error in Text
Decimal Type table is listed as both Decimal Type and Boolean Type.

Table should appear as:

Name bool
CTS Type System.Boolean
Values true or false

A new version of page 44 showing the correct table is available in the Downloads section.
07/19/2007

52Error in Code
for (int i = 0; i < 100; i+1)
{
Console.WriteLine(i);
}

Should be:

for (int i = 0; i < 100; i = i+1)
{
Console.WriteLine(i);
}
07/25/07

63Error in Text
rogram

should be:

program
10/02/2007

77Error in Code
public int subscriberId;

should be:

public int _subscriberId;
01/28/2008

99Error in Code
public Car ( ... ) : this(Model,4)

should be :

public Car ( ... ) : this(description,4)
08/20/2007

132Error in Code
if ((result == Withdraw(amount))

should be:
if ((result = Withdraw(amount)))
10/11/07

137Error in Text
Declaring this 2-dimensional array with C# is done by putting a semicolon inside the brackets.

should be:
Declaring this 2-dimensional array with C# is done by putting a comma inside the brackets.
11/06/07

138Error in Text
mid-page:

By using two semicolons inside the brackets, you can declare a 3-dimensional array:

should be:
By using two commas inside the brackets, you can declare a 3-dimensional array:
11/06/07

149Error in Code
Enumerator enumerator = new Enumerator();

should be:

Enumerator enumerator = new Enumerator(0);
02/06/2008

151Error in Example
for (int i = 3; i >= 0; i-)

Should be:
for (int i = 3; i >= 0; i--)
11/06/07

198Error in Text
The first text block after the code snippet currently reads:
?you would get a compilation error if you tried to initialize the variable firstStringMethod with any method that did not take any parameters and return a string.

Should read:
?you would get a compilation error if you tried to initialize the variable firstStringMethod with any method that did not take zero parameters and return a string.
08/15/2012

217Addition to Text
Add the variable busEntity referencing a new object of type BusEntity to the class Form1:
private BusEntity busEntity = new BusEntity();
02/06/2008

218Error in Code
The word brackets needs to be removed from code.
08/30/2007

8231Error in Figure 8-2
In Figure 8-2 the last box:

StringBuilder.AppendFormat( 0 ,D)

Should be

StringBuilder.AppendFormat( {0} ,1)
02/18/09

260Error in Code
public delegate TSummary Action(TInput t, TSummary s);

public static TSummary AccumulateG(IEnumerable coll,
Action action)
{
TSummary sum = default(TSummary);

foreach (TInput input in coll)
{
sum = action(input, sum);
}
return sum;
}

In the code above:
TOutput

should be:
TSummary
11/05/07

266To Clarify GetNullableType()
GetNullableType() was just meant to be a placeholder.
You can implement it this way:

int? GetNullableType()
{
return null;
}

OR this way:

int? GetNullableType()
{
return 4;
}

OR add any implementation.
11/13/07

275Typo in Code
racers.Add(Mario);

Should be

racers.Add(mario);
02/17/09

311Error in Text
The first three lines currently read:
The next line of code both declares a Customer object reference and instantiates a Customer object. In this instance, space on the stack for the otherCustomer2 reference is allocated and space for the mrJones object is allocated in a single line of code:
Customer otherCustomer2 = new EnhancedCustomer();

Should read:
The next line of code both declares a Customer object reference and instantiates a Customer object. In this instance, space on the stack for the otherCustomer2 reference is allocated at the same time as the space on the heap for the otherCustomer2 object:
Customer otherCustomer2 = new EnhancedCustomer();
08/15/2012

492Error in Text
After you build the assembly, the reference can be seen...

Should be:
After you've used a type from the C++ assembly and built the assembly, the reference can be seen...
09/20/07

781Error in Code
Currently:
string query = Really delete the file\n + filePath + y? ;

Should be:
string query = Really delete the file\n + filePath ;
08/15/2012

805Error in Code
In the code block (button1_Click):

File.ReadAll(textBox1.Text);

Should be

File.ReadAllText(textBox1.Text);
02/18/09

805Error in Text
using the File.ReadAll method

Should be

using the File.ReadAllText method



And



The ReadAll method opens

Should be

The ReadAllText method opens



And



The return value of the ReadAll method is

Should be

The return value of the ReadAllText method is



And



The File.ReadAll signature

Should be

The File.ReadAllText signature



And



File.ReadAll(FilePath)

Should be

File.ReadAllText(FilePath)
02/18/09

806Error in Text
The ReadAll method shown earlier

Should be

The ReadAllText method shown earlier
02/18/09