Beginning C# / Edition 1

Beginning C# / Edition 1

by Wrox Author Team, Nag, Zach Greenvoss, David Espinosa, Ollie Cornes
     
 

ISBN-10: 1861004982

ISBN-13: 9781861004987

Pub. Date: 10/01/2001

Publisher: Wrox Press, Inc.

C# is Microsoft's brand new programming language for its new platform, the .NET Framework. The .NET Framework consists of a runtime environment for managing the execution of our code, and a whole host of class libraries for performing almost any programming task you can think of. Although .NET code can be written in many languages, C# is the only language designed

Overview

C# is Microsoft's brand new programming language for its new platform, the .NET Framework. The .NET Framework consists of a runtime environment for managing the execution of our code, and a whole host of class libraries for performing almost any programming task you can think of. Although .NET code can be written in many languages, C# is the only language designed specifically for the .NET Framework, and as such is set to become the language of choice for writing .NET applications for years to come.

This book will be an indispensable guide as you learn to write C# programs, gradually explaining the key concepts of C# and .NET as your skills develop. After a thorough explanation of the basics of the C# language, we take an in-depth look at object-oriented programming in C#, before moving on to see how we write Windows applications in C#. We also show how you can create dynamic web pages and web services in C#. Finally, two case studies provide full examples of C# applications in action and show how it all ties together.

This book covers:

  • The C# language
  • .NET Programming with C#
  • Object-oriented programming
  • Writing Windows applications
  • Accessing databases
  • Writing web pages and web services in C#

Product Details

ISBN-13:
9781861004987
Publisher:
Wrox Press, Inc.
Publication date:
10/01/2001
Pages:
1000
Product dimensions:
7.26(w) x 8.98(h) x 2.20(d)

Table of Contents

Section 1Getting Started
Chapter 1Introducing C#1
What is the .NET Framework?1
What is C#?5
Visual Studio.NET7
Summary8
Chapter 2Writing a C# Program11
The Visual Studio.NET Development Environment11
Console Applications13
Windows Forms Applications18
Summary22
Section 2C# Language Basics
Chapter 3Variables and Expressions25
Basic C# Syntax25
Variables29
Expressions38
Summary49
Exercises49
Chapter 4Flow Control53
Boolean Logic53
Branching63
Looping71
Summary84
Exercises84
Chapter 5More About Variables87
Complex Variable Types96
String Manipulation112
Summary117
Exercises117
Chapter 6Functions121
Defining and Using Functions122
Variable Scope133
The Main() Function140
Struct Functions143
Overloading Functions144
Delegates146
Summary149
Exercises149
Chapter 7Debugging and Error Handling153
Debugging in Visual Studio154
Error Handling171
Summary178
Exercises179
Section 3Programming with Objects
Chapter 8Introduction to Object-Oriented Programming181
What is Object Oriented Programming?182
Static and Instance Class Members187
OOP Techniques188
OOP in Windows Applications197
Summary200
Exercises201
Chapter 9Defining Classes203
Class Definitions in C#203
System.Object209
Constructors and Destructors211
OOP Tools in Visual Studio.NET216
Class Library Projects221
Interfaces vs. Abstract Classes225
Struct Types227
Summary229
Exercises230
Chapter 10Defining Class Members233
Additional Class Member Topics244
Interface Implementation248
Example Application251
Summary258
Exercises258
Chapter 11More About Classes261
Collections261
Operator Overloading278
Advanced Conversions289
Deep Copying296
Custom Exceptions300
Summary302
Exercises302
Chapter 12Events305
What is an Event?305
Using Events307
Expanding and Using CardLib318
Summary325
Exercises326
Section 4Working with Windows Forms
Chapter 13Using Windows Form Controls329
The Windows Form Designer330
The Toolbox331
Controls332
The Button Control335
The Label and LinkLabel Controls339
The TextBox Control341
The RadioButton and CheckBox Controls352
The RichTextBox Control358
The ListBox and CheckedListBox Controls366
The ComboBox Control371
The ListView Control378
The StatusBar Control390
The TabControl Control393
Summary397
Chapter 14Advanced Windows Forms Features399
Menus399
Toolbars408
SDI and MDI Applications415
Creating Controls428
Summary440
Exercise440
Chapter 15Using Dialogs443
Dialogs443
How to use Dialogs445
File Dialogs446
Printing465
Print Preview479
FontDialog and ColorDialog481
Summary485
Exercises486
Chapter 16Introduction to GDI+489
Overview of Graphical Drawing489
Drawing Lines using the Pen Class499
Drawing Shapes using the Brush Class501
Drawing Text using the Font Class504
Drawing Using Images508
Advanced Capabilities of GDI+517
Summary520
Chapter 17Deploying Windows Applications523
What is Deployment?524
Deployment Project Types524
Microsoft Windows Installer Architecture526
Creating an Installation Package for the Simple Editor528
Building the Project544
Installation545
Summary552
Section 5Programming on the .NET Framework
Chapter 18Getting At Your Data555
Data Access in VS555
Viewing Data in VS558
Accessing the Database from an Application564
Seeing the Whole Picture572
Navigating through the DataSet573
Adding Lists574
Adding a Datagrid576
XML579
Summary595
Chapter 19Data Access with ADO.NET597
What is ADO.NET?597
Overview of ADO.NET Classes and Objects599
XML and ADO.NET627
XML Support in ADO.NET DataSets627
SQL Support in ADO.NET629
Further Information on ADO.NET634
Summary634
Exercises634
Chapter 20Working With Files637
Streams637
The Classes for Input and Output638
Advanced Topics656
Summary668
Exercises668
Chapter 21.NET Assemblies671
Introduction to Assemblies671
Self-Description673
Structure of Assemblies675
Creating Assemblies676
Viewing the Contents of an Assembly678
Assembly Attributes684
Calling Assemblies688
Private and Shared Assemblies692
Summary696
Exercises697
Chapter 22Attributes699
What Is An Attribute?699
Reflection703
Built In Attributes706
Custom Attributes717
Summary742
Section 6C# and the Web
Chapter 23Web Programming Basics745
Introduction745
A Brief History of the Internet745
Web Programming 101749
Web Evolution762
.NET Web Programming763
Summary765
Chapter 24ASP.NET Applications767
Building our Weblog768
Weblog Entries777
Creating New Weblog Entries804
User Sessions and Cookles818
Summary823
Questions823
Chapter 25Web Services825
Before Web Services826
Where to Use Web Services827
Web Services Architecture830
Web Services and the .NET Framework836
Create a Simple ASP.NET Web Service839
Testing the Web Service842
Implementing a Windows Client843
Implementing an ASP.NET Client848
Summary850
Section 7Case Studies
Case Study 1Web Site Poll853
Web Site Poll853
Version 1854
Version 2881
Three-Tier and the Poll Application901
Summary902
Case Study 2An Online Newsletter Manager905
NewsMailer905
Data and Business Objects908
The Administration User Interface921
Appendix ASetting the Path Environment Variable963
Windows 2000/XP963
Windows NT965
Windows 95/98/ME965
Appendix BInstalling MSDE967
Appendix CC# Compilation Options979
Index987
C#Today Article: Building An Online shopping Cart Using C#1013

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >