Vous voulez voir cette page en français ? Cliquez ici.

Have one to sell? Sell yours here
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

C++ Primer [Paperback]

Stanley B. Lippman
3.6 out of 5 stars  See all reviews (18 customer reviews)

Available from these sellers.


Amazon Price New from Used from
Paperback --  
Paperback, August 1989 --  
There is a newer edition of this item:
C++ Primer (5th Edition) C++ Primer (5th Edition) 5.0 out of 5 stars (2)
CDN$ 39.68
In Stock.

Book Description

August 1989
Writing effective C# code- an example-rich primer from one of the worlds leading C++ authors!
Step-by-step coverage presented in the context of real code examples!
New C# techniques for building Web services and COM+ components.
Practical coverage of advanced features- interfaces, delegates, events, attributes, reflection, exception handling, namespaces, assemblies, and more. Developers have long sought a language that combined the simplicity of Visual Basic with the power and flexibility of C++. For them, Microsoft has created C# -- systematically incorporating features intended to simplify the development of next-generation components and services. Now, one of the worlds leading C++ experts and authors presents a start-to-finish, practical introduction developers need to leverage their existing skills with Microsofts breakthrough new language. Stanley B. Lippman -- who was on the ground floor of the worldwide C++ revolution -- focuses on C# as a tool for building sophisticated COM+ components and Web services. Using extensive program examples, Lippman walks step-by-step through the fundamentals of C# syntax, classes, and object-oriented programming; inheritance, interfaces, delegates, events, attributes, reflection, exception handling, namespaces, assemblies, and more. The book concludes with a detailed chapter on interoperability between C# and legacy code. Appendices include a concise C# handbook and a quick tour of the new Visual Studio.NET development environment. For all intermediate programmers and developers who want to leverage their C, C++, or Java skills with Microsofts new C#.
Stanley B. Lippman provides training, consulting, design, and mentoring in C++. He is currently developing a training course in C# for SELA, an international on-line education and training organization. Prior to becoming an independent consultant, he has worked as a principal software engineer at Dream Works and Walt Disney Feature Animation. At AT&T Bell Laboratories, he led the cfront Release 3.0 and Release 2.1 compiler development team. He is author of three highly successful editions of the C++ Primer, as well as Essential C++, and C++ Object Model.
--This text refers to an out of print or unavailable edition of this title.

Product Details

Product Description

From the Inside Flap

C# is a new language invented at Microsoft and introduced with Visual Studio.NET. More than a million lines of C# code already have gone into the implementation of the .NET class framework. This book covers the C# language and its use in programming the .NET class framework, illustrating application domains such as ASP.NET and XML.

My general strategy in presenting the material is to introduce a programming task and then walk through one or two implementations, introducing language features or aspects of the class framework as they prove useful. The goal is to demonstrate how to use the language and class framework to solve problems rather than simply to list language features and the class framework API.

Learning C# is a two-step process: learning the details of the C# language and then becoming familiar with the .NET class framework. This two-step process is reflected in the organization of this text.

In the first step we walk through the language--both its mechanisms, such as class and interface inheritance and delegates, and its underlying concepts, such as its unified type system, reference versus value types, boxing, and so on. This step is covered in the first four chapters.

The second step is to become familiar with the .NET class framework, in particular with Windows and Web programming and the support for XML. This is the focus of the second half of the book.

Working your way through the text should jump-start your C# programming skills. In addition, you'll become familiar with a good swatch of the .NET class framework.

Mail can be sent to me directly at slippman@objectwrite.com.

Organization of the Book

The book is organized into eight relatively long chapters. The first four chapters focus on the C# language, looking at the built-in language features, the class mechanism, class inheritance, and interface inheritance. The second four chapters explore the various library domains supported within the .NET class framework.

Chapter 1 covers the basic language, as well as some of the fundamental classes provided within the class framework. The discussion is driven by the design of a small program. Concepts such as namespaces, exception handling, and the unified type system are introduced.

Chapter 2 covers the fundamentals of building classes. We look at access permission, distinguish between const and readonly members, and cover specialized methods such as indexers and properties. We walk through the different strategies of member initialization, as well as the rules for operator overloading and conversion operators. We look at the delegate type, which serves as a kind of universal pointer to a function.

Chapters 3 and 4 cover, in turn, class and interface inheritance. Class inheritance allows us to define a family of specialized types that override a generic interface, such as an abstract WebRequest base class and a protocol-specific HttpWebRequest subtype. Interface inheritance, on the other hand, allows us to provide a common service or shared attribute for otherwise unrelated types. For example, the IDisposable interface frees resources. Classes holding database connections or window handles are both likely to implement IDisposable, although they are otherwise unrelated.

Chapter 5 provides a wide-ranging tour of the .NET class library. We look at input and output, including file and directory manipulation, regular expressions, sockets and thread programming, the WebRequest and WebResponse class hierarchies, a brief introduction to ADO.NET and establishing database connections, and the use of XML.

Chapters 6 and 7 cover, in turn, drag-and-drop Windows Forms and Web Forms development. Chapter 7 focuses on ASP.NET, and the Web page life cycle. Both chapters provide lots of examples of using the prebuilt controls and attaching event handlers for user interaction.

The final chapter provides a programmer's introduction to the .NET Common Language Runtime. It focuses on assemblies, type reflection, and attributes, and concludes with a brief look at the underlying intermediate language that is the compilation target of all .NET languages.

Written for Programmers

The book does not assume that you know C++, Visual Basic, or Java. But it does assume that you have programmed in some language. So, for example, I don't assume that you know the exact syntax of the C# foreach loop statement, but I do assume that you know what a loop is. Although I will illustrate how to invoke a function in C#, I assume you know what I mean when I say we "invoke a function." This text does not require previous knowledge of object-oriented programming or of the earlier versions of ASP and ADO.

Some people--some very bright people--argue that under .NET, the programming language is secondary to the underlying Common Language Runtime (CLR) upon which the languages float like the continents on tectonic plates. I don't agree. Language is how we express ourselves, and the choice of one's language affects the design of our programs. The underlying assumption of this book is that C# is the preferred language for .NET programming.

The book is organized into eight relatively long chapters. The first set of four chapters focuses on the C# language, looking at the built-in language features, the class mechanism, class inheritance, and interface inheritance. The second set of four chapters explores the various library domains supported within the .NET class framework, such as regular expressions, threading, sockets, Windows Forms, ASP.NET, and the Common Language Runtime.

Lexical Conventions

Type names, objects, and keywords are set off in Courier font, as in int, a predefined language type; Console, a class defined in the framework; maxCount, an object defined either as a data member or as a local object within a function; and foreach, one of the predefined loop statements. Function names are followed by an empty pair of parentheses, as in WriteLine(). The first introduction of a concept, such as garbage collection or data encapsulation, is highlighted in italics. These conventions are intended to make the text more readable.


The richest documentation that you will be returning to time and again is the Visual Studio.NET documentation. The .NET framework reference is essential to doing any sort of C#/.NET programming.

Another rich source of information about .NET consists of the featured articles and columns in the MSDN Magazine. I'm always impressed by what I find in each issue.Currently, most of their writing has appeared only as articles in MSDN Magazine.Here is the collection of books that I have referenced or found helpful:

  • Active Server Pages+, by Richard Anderson, Alex Homer, Rob Howard, and Dave Sussman, Wrox Press, Birmingham, England, 2000.
  • C# Essentials, by Ben Albahari, Peter Drayton, and Brad Merrill, O'Reilly, Cambridge, MA, 2001.
  • C# Programming, by Burton Harvey, Simon Robinson, Julian Templeman, and Karli Watson, Wrox Press, Birmingham, England, 2000.
  • Essential XML: Beyond Markup, by Don Box, Aaron Skonnard, and John Lam, Addison-Wesley, Boston, 2000.
  • Microsoft C# Language Specifications, Microsoft Press, Redmond, WA, 2001.
  • A Programmer's Introduction to C#, 2nd Edition, by Eric Gunnerson, Apress, Berkeley, CA, 2001. --This text refers to an out of print or unavailable edition of this title.

From the Back Cover

Using his famous primer format, best-selling author Stan Lippman now brings you an indispensable guide to C#. C# PRIMER is a comprehensive, example-driven introduction to this new object-oriented programming language.

C# is a cornerstone of Microsoft's new .NET platform. Inheriting many features from both Java™ and C++, C# is destined to become the high-level programming language of choice for building high-performance Windows® and Web applications and components--from XML-based Web services to middle-tier business objects and system-level applications.

  • Coverage of fundamentals, such as namespaces, exception handling, and the unified type system
  • Detailed explanations and examples of both class and interface inheritance, including a discussion of when each is appropriate
  • A wide-ranging tour of the .NET class library, including an introduction to ADO.NET, establishing database connections, regular expressions, threading, sockets programming, XML programming using the firehose and DOM parser models, XSLT, and XPATH
  • Detailed discussion of ASP.NET Web Form Designer, walking through the page life cycle and caching, and providing a large number of examples
  • Introduction to .NET Common Language Runtime (CLR)

Adding C# to your toolbox will not only improve your Web-based programming ability, it will increase your productivity. C# PRIMER provides a solid foundation to build upon and a refreshingly unbiased voice on Microsoft's vehicle to effective and efficient Web-based programming.

0201729555B07102002 --This text refers to an out of print or unavailable edition of this title.

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Reviews

Most helpful customer reviews
4.0 out of 5 stars Good C# introduction for experienced programmers July 11 2003
By A Customer
Lippman's C# Primer assumes that the reader knows C++ or Java. It does not cover basic language constructs so it is not a good choice as a first C# book for people that have not programmed before. The first four chapters include many good insights into the C# language from a professional programmer's point of view. These are hard to find in other texts and make this book worthwhile. A future edition should concentrate on including more language insights and less on WinForms or ASP.NET specifics that are covered better on other texts. Probably some basics should be included to expand its appeal to new programmers.
Was this review helpful to you?
4.0 out of 5 stars A primer for the experienced (C++) Oct. 3 2002
The first 4 chapters (~200 pages) is where it's at. I read his books on C++ and those and this one are right on the mark. Chapter 5-8 are about the .Net Framework (a bit cursory) and dated (pre-release beta) and much has changed. The first 4 chapters are a gem. But where is Stan ? His firm objectwrite.com is nowhere to be seen on the web. Therefore, sample code is not available.
Was this review helpful to you?
2.0 out of 5 stars C# Primer - Less Than Practical April 16 2002
By A Customer
If you're accustomed to Lippman's previous works, this book will fall hopelessly short of expectation. I found this book to be lacking not just in content, but in direction. The "practical approach" employed by Lippman I found to be less-than-practical. The text feels hurried, does not flow well, and the sample code is replete with errors and inconsistencies. There is also alot of useless prose geared towards warming the junior programmer to object-oriented theory. This is not a good book for someone coming from a C++ or Java background hoping to come up to speed on C#. If, on the other hand, you enjoy long-winded hyperbole on "What is a constructor," with ailing code samples to match, this book is for you.
Was this review helpful to you?
3.0 out of 5 stars Not bad, could be clearer on the trickier points March 25 2002
Overall this book is decent, if you have programming experience.
I wish it would contrast C# to other languages; no reason to have to read thru a whole explanation, if he would just say, "this feature works just like Java...".
The biggest flaw is that for some of the stranger concepts, he doesn't really build up a sufficient explanation. I am a very experienced OO Architect and Java coder, yet I found his explanations of such subjects as "a Polymorphic Query Language" incomplete.
With few exceptions however the book is well written, had minimal typos, and was acceptable
Was this review helpful to you?
2.0 out of 5 stars An adequate Introduction, but nothing more March 18 2002
It is a perfectly adequate introduction to the langauge and nothing else. The discussion of delegates is confusing -- the online docs were better.
The book answers how-to use language features, but not why to use them. It does nothing to discuss any of the pitfalls of the constructs in the langauge, like the dangers surrounding implict conversions and operator overloading. Finally he doesn't discuss the Debug, Trace and Attribute classes in any useful detail.
Was this review helpful to you?
4.0 out of 5 stars Good for C++ Programmers March 9 2002
I have three C# books on my desk. Whle Stan's book is a bit smaller than the others, I like it better from the standpoint of a C++ programmer. While I don't know that it was intentional, Stan's strong background in C++ may have been what caused this.
Where I've found the book useful is where I want to do something I do in C++ using C#. My sucess rate at finding what I want in this situation is better than with other books.
Now, I just want to see a Second Edition with a bit more content!
Was this review helpful to you?
4.0 out of 5 stars An interesting dichotomy March 5 2002
I expected very little from this book. The cover has very little shelf presence and is, frankly, quite ugly, IMHO. I guess you should never judge a book by its cover.
First the bad. If you come into this book expecting a real primer, from the dictionary definition of the word, you will be disappointed. While this book does cover the basics, the methodology is almost too strange to help someone first learning the language. If you want to learn C# from scratch, I think there are better books.
Having said that, there is a lot to love in this tome. Lippman has a strong grasp of what true programming is about and starts from the very beginning. While most of the revelations are hidden gems, the content is absolutely astounding, if you actually dig for the diamonds.
Want an example? Where else will you find an example as deep as this:
string usage = @"this is a verbatim string
the carriage return will be included in the string"
The style is a lot different than other books on the market, which may lead some to shoot this book down. I had the same reaction in the first couple of pages, but quickly changed my mind as I found more and more info that you cannot find anywhere else. As someone who purchases a lot of books (I consider programming a career, not a job), I appreciate every little nugget I get from each book, as, I hope, you do too.
Lippman's idea is to show a program and then run through different iterations, showing you a bit more with each turn. This is contrary to the typical, explain first and then show code, methodology, so it will most likely have you off guard at first. But, if you give it a go, the system works.
Read more ›
Was this review helpful to you?
5.0 out of 5 stars Excellent introduction to C# Feb. 15 2002
Imagine that someone who's intellect and judgement you trust is sitting with you while you are attempting to learn a language. You both start by taking a project that you've implemented in another language and you implement it with the new language - in this case C#. The senior of the two of you shows you what the language has to offer, and some of the common pot holes in which you are likely to step.
After you've finished the project you have a much better grasp than if you just read the compiler spec and went at it. This book does just that. Stan has written and excellent book, and I thank him for the effort. He has made the learning curve flatter and saved me hundreds of times the cost of the book.
Was this review helpful to you?
Want to see more reviews on this item?

Look for similar items by category