Professional C# 2nd Edition is now available. Professional C# 2nd Edition is a completely revised edition of this book, and is fully compatible with the final release of the .NET Framework. We strongly recommend that you order the new edition (Professional C# 2nd Edition, ISBN 1861007043) in preference to this edition.
Using C#, you can write, for example, a dynamic web page, a component of a distributed application, a database access component, or a classic Windows desktop application. Between them C# and .NET are set to revolutionise the way that you write programs and to make programming on Windows very much easier than it has ever been.
More Reviews and RecommendationsThe authors are a multi-Wrox author team of professional C# developers.
Reader Rating:
See Detailed Ratings
May 28, 2004: It's title reflects the type of book that it is:- A professional programmer's book. It had indepth coverage of the various matter and a description of how the primitive and reference type's work on the heap and stack etc..
Reader Rating:
See Detailed Ratings
August 25, 2001: I used this book to study c# and ended up getting more then I anticipated. C# is a quick to learn programming language and, with the help of this book, I was using it in under a week. The book has also proved to be a great reference tool.
The Barnes & Noble Review
You can create .NET programs in several languages -- that's the whole point of the Common Language Runtime and Microsoft Intermediate Language (MSIL). But, as in George Orwell's Animal Farm, "All animals are equal, but some animals are more equal than others." The language that's "more equal" is C#, and if you're serious about .NET development, mastering C# is well worth your time.
So is Wrox's Professional C# Programming. Wrox's team of Windows programming luminaries covers every nook and cranny, showing how the language can be used to build every category of .NET software: classic Windows applications, new Windows services, distributed components, web apps, web controls, and ASP.NET-based web services. Wrox assumes you've done some Windows programming (VB, C++, or Java), but you needn't bring any .NET knowledge -- they'll cover all that. And, as with most Wrox books we've seen, this one's full of code samples.
The first chapters introduce C# syntax, classes and inheritance, and the fundamentals of object-oriented C# development. The authors introduce C# base classes, then drive home the connections between C# and the broader .NET environment.
There's a thorough introduction to assemblies -- .NET building blocks that bring together functionality that can be constructed, versioned, and deployed as one. You'll master data access techniques; learn how to view .NET data; and discover how to make the most of C#'s XML support.
The book contains in-depth coverage of COM interoperability -- a complex issue, as .NET can import automation-compliant COM objects, but not custom COM interfaces. There's practical C# code for implementing .NET security, as well as a full chapter on remoting, .NET's powerful technique for communicating amongst distributed application components.
Lots of C# books will get you started. Few of them will carry you as far as Professional C# Programming. (Bill Camarda)
Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.
What is this book about?
C# is designed to work with .NET to provide a new framework for programming on the Windows platform. This comprehensive reference prepares you to program in C#, while at the same time providing the necessary background in how the .NET architecture works.
In this all-new third edition, you’ll be introduced to the fundamentals of C# and find updated coverage of application deployment and globalization. You’ll gain a working knowledge of the language and be able to apply it in the .NET environment, build Windows forms, access databases with ADO.NET, write components for ASP.NET, take advantage of .NET support for working with COM and COM+, and much more.
Professional C#, 3rd Edition, is the complete C# resource for developers, packed with code and examples that have been updated for the latest release — the .NET Framework 1.1 and Visual Studio .NET 2003.
What does this book cover?
Here is just a few of the things you'll discover in this book:
Who is this book for?
This book is for experienced developers who are already familiar with C++, Visual Basic, or J++. No prior knowledge of C# is required.
Loading...Introduction.
Part I: The C# Language.
Chapter 1: .NET Architecture.
Chapter 2: C# Basics.
Chapter 3: Objects and Types.
Chapter 4: Inheritance.
Chapter 5: Operators and Casts.
Chapter 6: Delegates and Events.
Chapter 7: Memory Management and Pointers.
Chapter 8: Strings and Regular Expressions.
Chapter 9: Collections.
Chapter 10: Reflection.
Chapter 11: Errors and Exceptions.
Part II: The .NET Environment.
Chapter 12: Visual Studio .NET.
Chapter 13: Assemblies
Chapter 14: .NET Security.
Chapter 15: Threading.
Chapter 16: Distributed Applications with .NET Remoting.
Chapter 17: Localization.
Chapter 18: Deployment.
Part III: Windows Forms.
Chapter 19: Windows Forms.
Chapter 20: Graphics with GDI+.
Part IV: Data.
Chapter 21: Data Access with .NET.
Chapter 22: Viewing .NET Data.
Chapter 23: Manipulating XML.
Chapter 24: Working with Active Directory.
Part V: Web Programming.
Chapter 25: ASP.NET Pages.
Chapter 26: Web Services.
Chapter 27: User Controls and Custom Controls.
Part VI: Interop.
Chapter 28: COM Interoperability.
Chapter 29: Enterprise Services.
Part VII: Windows Base Services.
Chapter 30: File and Registry Operations.
Chapter 31: Accessing the Internet.
Chapter 32: Windows Services.
At www.wrox.com.
Appendix A: Principles of Object-Oriented Programming.
Appendix B: C# for Visual Basic 6 Developers.
Appendix C: C# for Java Developers.
Appendix D: C# for C++ Developers.
Index.
However there are situations in which simply using controls doesn't give you the flexibility you need in your user interface. For example, you may want to draw text in a given font in a precise position in a window, or you may want to display images without using a picture box control, simple shapes or other graphics. A good example, is the Word for Windows program that I am using to write this chapter. At the top of the screen are various menus and toolbars that I can use to access different features of Word. Some of these menus and buttons bring up dialog boxes or even property sheets. That part of the user interface is what we covered in Chapter 9. However, the main part of the screen in Word for Windows is very different. It's an SDI window, which displays a representation of the document. It has text carefully laid out in the right place and displayed with a variety of sizes and fonts. Any diagrams in the document must be displayed, and if you're looking at the document in Print Layout view, the borders of the actual pages need to be drawn in too. None of this can be done with the controls from Chapter 9. To display that kind of output, Word for Windows must take direct responsibility for telling the operating system precisely what needs to be displayed where in its SDI window. How to do this kind of thing is subject matter for this chapter.
We're going to show you how to draw a variety of items including:
In the process, we'll also need to use a variety of helper objects including pens (used to define the characteristics of lines), brushes (used to define how areas are filled in – for example, what color the area is and whether it is solid, hatched, or filled according to some other pattern), and fonts (used to define the shape of characters of text). We'll also go into some detail on how devices interpret and display different colors.
The code needed to actually draw to the screen is often quite simple, and it relies on a technology called GDI+. GDI+ consists of the set of .NET base classes that are available for the purpose of carrying out custom drawing on the screen. These classes are able to arrange for the appropriate instructions to be sent to the graphics device drivers to ensure the correct output is placed on the monitor screen (or printed to a hard copy). Just as for the rest of the .NET base classes, the GDI+ classes are based on a very intuitive and easy to use object model.
Although the GDI+ object model is conceptually fairly simple we still need a good understanding of the underlying principles behind how Windows arranges for items to be drawn on the screen in order to draw effectively and efficiently using GDI+.
This chapter is broadly divided into two main sections. In the first two-thirds of the chapter we will
explore the concepts behind GDI+ and examine how drawing takes place, which means that this part of
the chapter will be quite theoretical, with the emphasis on understanding the concepts. There will be
quite a few samples, almost all of them very small applications that display specific hard-coded items
(mostly simple shapes such as rectangles and ellipses). Then for the last third of the chapter we change
tack and concentrate on working through a much longer sample, called CapsEditor, which displays
the contents of a text file and allows the user to make some modifications to the displayed data. The
purpose of this sample, is to show how the principles of drawing should be put into practice in a real
application. The actual drawing itself usually requires little code – the GDI+ classes work at quite a high
level, so in most cases only a couple of lines of code are required to draw a single item (for example, an
image or a piece of text). However, a well designed application that uses GDI+ will need to do a lot of
additional work behind the scenes, that is it must ensure that the drawing takes place efficiently, and
that the screen is updated when required, without any unnecessary drawing taking place. (This is
important because most drawing work carries a very big performance hit for applications.) The
CapsEditor sample shows how you'll typically need to do much of this background management.
The GDI+ base class library is huge, and we will scarcely scratch the surface of its features in this
chapter. That's a deliberate decision, because trying to cover more than a tiny fraction of the classes,
methods and properties available would have effectively turned this chapter into a reference guide that
simply listed classes and so on. We believe it's more important to understand the fundamental principles
involved in drawing; then you will be in a good position to explore the classes available yourself. (Full
lists of all the classes and methods available in GDI+ are of course available in the MSDN
documentation.) Developers coming from a VB background, in particular, are likely to find the concepts
involved in drawing quite unfamiliar, since VB's focus lies so strongly in controls that handle their own
painting. Those coming from a C++/MFC background are likely to be in more comfortable territory
since MFC does require developers to take control of more of the drawing process, using GDI+'s
predecessor, GDI. However, even if you have a good background in GDI, you'll find a lot of the
material is new. GDI+ does actually sit as a wrapper around GDI, but nevertheless GDI+ has an object
model which hides many of the workings of GDI very effectively. In particular, GDI+ replaces GDI's
largely stateful model in which items were selected into a device context with a more stateless one, in
which each drawing operation takes place independently. A Graphics object (representing the device
context) is the only object that persists between drawing operations.
By the way, in this chapter we'll use the terms drawing and painting interchangeably to describe the process of displaying some item on the screen or other display device.
Before we get started we will quickly list the main namespaces you'll find in the GDI+ base classes. They are...
...Almost all the classes, structs and so on. we use in this chapter will be taken from the System.Drawing
namespace.
loading...
loading...
loading...
Terms of Use, Copyright, and Privacy Policy
© 1997-2009 Barnesandnoble.com llc