×

Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Introduction to C# Using .NET
     

Introduction to C# Using .NET

5.0 1
by Robert J. Oberg, Robert Oberg
 
Get results with C#, with the hands-on C# introduction based on proven development experience from an expert practictioner. With Introduction to C# Using .NET, you'll learn C# object-oriented development step-by-step, by constructing a complete .NET "travel agency" system! Seasoned .NET instructor Robert J. Oberg covers key .NET database, Web, XML, and user

Overview

Get results with C#, with the hands-on C# introduction based on proven development experience from an expert practictioner. With Introduction to C# Using .NET, you'll learn C# object-oriented development step-by-step, by constructing a complete .NET "travel agency" system! Seasoned .NET instructor Robert J. Oberg covers key .NET database, Web, XML, and user interface classes -- plus collections, delegates, events, multithreading, attributes, and much more!

Product Details

ISBN-13:
9780130418012
Publisher:
Prentice Hall
Publication date:
10/28/2001
Series:
Integrated .NET Series from Object Innovations Series
Pages:
480
Product dimensions:
6.90(w) x 9.00(h) x 1.10(d)

Read an Excerpt

Preface

Microsoft's .NET is a revolutionary advance in programming technology that greatly simplifies application development and is a good match for the emerging paradigm of Web-based services as opposed to proprietary applications. Part of this technology is a new language, C#. This new language combines the power of C++ and the ease of development of Visual Basic(TM). It bears striking resemblance to Java(TM) and improves upon that language. C# may well become the dominant language for building applications on Microsoft(R) platforms.

This book is a practical introduction to programming in C# utilizing the services provided by .NET. This book emphasizes the C# language. It is part of the Prentice Hall/Object Innovations series of books on .NET technology.

This book is intended to be fully accessible to programmers who do not already have a strong background in object-oriented programming in C-like languages such as C++ or Java. It is ideal, for example, for Visual Basic or COBOL programmers who desire to learn C#. The book may also be read by more experienced programmers who desire a simple and concise introduction to C# with many example programs. It is structured so that more ex-perienced programmers can cleanly skip the material they already know. Although designed for working professionals, the book includes enough de-tail, careful explanations and sample programs so that it can be useful as a college textbook.

An important thrust of this book is to teach C# programming from an object-oriented perspective. It is often difficult for programmers trained originally in a procedural language to start "thinking in objects." This book introduces object-orientedconcepts early, and C# is developed in a way that leverages its object-orientation. A banking system case study is used to illustrate creating a complete system using C# and .NET. Besides supporting traditional object-oriented features such as classes, inheritance, and polymorphism, C# introduces several additional features, such as properties, indexers, delegates, events, and interfaces that make C# a compelling language for developing object-oriented and component-based systems. This book provides thorough coverage of all these features.

C# as a language is elegant and powerful. But to fully utilize its ca-pabilities you need to have a good understanding of how it works with the .NET Framework. The book explores several important interactions between C# and the .NET Framework, and it includes an introduction to major classes for collections, files, threads, and user interface.ORGANIZATION

The book is organized into four major parts and is structured in a manner to make it easy for you to navigate to what you most need to know. Part 1, which should be read by everyone, begins with an introduction to the .NET Framework, which is the underpinning for all applications and services in the .NET environment. Next comes a short introduction to hands-on pro-gramming using C#, so that you can start writing code on .NET right away. The third chapter introduces Visual Studio.NET, the latest incarnation of Microsoft's popular Visual Studio development environment. The new Visual Studio has many features that make application development easier and more pleasant. You will be equipped to use Visual Studio throughout the rest of the book.

Part 2 covers the C-like features of C#, which are shared by C, C++, Java, and various scripting languages. Thus, if you know any of these C-like languages, you will have a definite leg up in learning C#, and you can quickly skim this section, paying attention to the information in the side-bars. A sidebar will alert you the first time a concept new to C# is intro-duced. Then you will know to look for further elaborations where they occur later. If you are not familiar with C or a similar language, this section is for you. It will quickly bring you up to speed on the core topics of data types, operators, and control structures.

Part 3 is the core of the book, systematically covering the features of the C# programming language that go beyond C. The object-oriented features of C# are covered gradually and thoroughly, making this part of the book accessible to readers without OOP background. A case study is used, illustrating how the object-oriented features of C# work in combination. This case study is progressively built from Chapters 12 through 18. The C# data types, based on the .NET Common Type System, are explored in detail. We cover features new in C# such as properties and indexers. We cover prac-tical issues of formatting and conversions, and we discuss the important topic of exceptions. We conclude this part with a study of interfaces, which provide a better level of abstraction in expressing system functionality.

Part 4 explores thoroughly the relationships between C# and the .NET Framework and introduces some important .NET services. We introduce collections, which generalize arrays, and we examine fundamental operations such as copying and comparing objects. In .NET, interfaces are provided for such basic operations, which makes for a very flexible architecture, as different classes can implement these interfaces in a manner appropriate for them. The .NET Framework provides a very flexible callback mechanism, known as delegates, which has many applications. Delegates are the foundation of events, and they are also used in starting threads. We look at directories and files, multiple thread programming, and attributes. Attributes are a powerful mechanism in .NET, enabling the programmer to accomplish tasks declaratively, with writing little or no code. You can implement your own custom attributes in C#. You can read information about custom attributes, or any other metadata, by a mechanism known as "reflection." C# permits you to code at a lower level by writing "unsafe" code, which can help you interoperate with legacy code. The book concludes with introductions to components and to Windows programming.SAMPLE PROGRAMS

The only way to really learn a programming language is to read and write many, many programs, including some of reasonable size. This book provides many small programs that illustrate pertinent features of C# in iso-lation, where they are easy to understand. The programs are clearly labeled in the text, and they can all be found in the software distribution that ac-companies this book. Directions for downloading the software are given be-low.

There is also a major case study, that is progressively developed in Chapters 12 through 18. This case study illustrates many features of C# working together in combination, as they would in a practical application. A special point is made of demonstrating the object-oriented features of C#. If you are new to OO, studying the case study is a must!

The sample programs are provided in a self-extracting file. When ex-panded, a directory structure is created rooted in c:\OI\CSharp. The sample programs are in directories Chap1, Chap2, etc. All the samples for a given chapter are in individual folders within the chapter directories. The names of the folders are clearly identified in the text. Each chapter that contains a step of the case study has a folder CaseStudy containing that step.

This book is part of the Integrated .NET Series from Object Innovations and Prentice Hall PTR series. The sample programs for other books in the series are located in their own directory underneath c:\OI, so all the .NET examples from all books in the series will be located in a common area as you install them.EXERCISES

Although exercises are not provided in the book itself, a comprehensive set of exercises is available for download from our website. WEBSITEThe website for the Integrated .NET Series from Object Innovations and Prentice Hall PTR series is:

www.objectinnovations.com/dotnet.htm

A link is provided at that website for downloading the sample programs.

Meet the Author

DR. ROBERT J. OBERG is the founder and President of Object Innovations, a leading developer of integrated courseware on fundamental software technologies including Microsoft .NET, COM/DCOM/COM+, OLE, MFC, and Java. His books include Understanding and Programming COM+ (Prentice Hall PTR).

Customer Reviews

Average Review:

Post to your social network

     

Most Helpful Customer Reviews

See all customer reviews

Introduction to C# Using .NET 5 out of 5 based on 0 ratings. 1 reviews.
Guest More than 1 year ago
A concisely written book for beginners to learn basics of C# and .Net Framework.This book 'Introduction to C# Using .Net' gives a new-fangled dimension of realistic approach to programming in C#. This book accentuate the C# language.This book provides methodical exposure to the C# language from the foundation.This book is appropriate for programmers who do not already have a strong background in object-oriented programming in C like languages such as C++ or Java. The book introduces this innovative technology in a straightforward and crisp way. This book is perfect for programmers who have basic knowledge in languages such as Visual Basic and COBOL programmers. This book is not only for the beginners it also aims for experienced programmers by providing a concrete, concise and simple introduction to C# with a lot of example programs. This book provides a comprehensive and broad vision to C# programming so it is ideal to be used as College textbook. The book presents the concept of object-oriented programming and talk about the important elements of object-oriented analysis.This book is clearly defined, in-depth, example-rich, provides a hands on introduction to the C# using .NET. The comprehensive banking case study gives an innovative dimension of pragmatic approach to programming in C#. The leading .NET trainer and developer Robert J.Oberg teaches C# step-by-step in a comprehensive manner.