2002 oreilly learning c sharp1

808 135 0
2002   oreilly   learning c sharp1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Table of • Contents • Index • Reviews Reader • Reviews • Errata Learning C# By Jesse Liberty Publisher : O'Reilly Pub Date : September 2002 ISBN : 0-596-00376-5 Pages : 368 Slots : 1 With Learning C#, best-selling author Jesse Liberty will help you build a solid foundation in NET and show how to apply your skills by using dozens of tested examples You will learn how to develop various kinds of applications-including those that work with databases and web services Whether you have a little object-oriented programming experience or you are new to programming altogether, Learning C# will set you firmly on your way Learning C# By Jesse Liberty Table of Publisher : O'Reilly • Contents Pub Date : September 2002 ISBN : 0-596-00376-5 • Index Pages : 368 • Reviews Slots : 1 Reader • Reviews • Errata Copyright Preface About This Book Who This Book Is For How the Book Is Organized Conventions Used in This Book Support We'd Like to Hear from You Acknowledgments Chapter 1 C# and NET Programming Section 1.1 C# and NET Section 1.2 The NET Platform Section 1.3 The NET Framework Section 1.4 The C# Language Section 1.5 The Structure of C# Applications Section 1.6 The Development Environment Chapter 2 Getting Started with C# Section 2.1 What's in a Program? Section 2.2 Your First Program: Hello World Section 2.3 Examining Your First Program Chapter 3 Object-Oriented Programming Section 3.1 Creating Models Section 3.2 Classes and Objects Section 3.3 Defining a Class Section 3.4 Class Relationships Section 3.5 The Three Pillars of Object-Oriented Programming Section 3.6 Encapsulation Section 3.7 Specialization Section 3.8 Polymorphism Section 3.9 Object-Oriented Analysis and Design Chapter 4 Visual Studio NET Section 4.1 Start Page Section 4.2 Inside the Integrated Development Environment (IDE) Section 4.3 IntelliSense Section 4.4 Building and Running Section 4.5 For More Information Chapter 5 C# Language Fundamentals Section 5.1 Types Section 5.2 Variables Section 5.3 Definite Assignment Section 5.4 Constants Section 5.5 Strings Section 5.6 Statements Section 5.7 Expressions Section 5.8 Whitespace Chapter 6 Branching Section 6.1 Unconditional Branching Statements Section 6.2 Conditional Branching Statements Section 6.3 Iteration (Looping) Statements Chapter 7 Operators Section 7.1 The Assignment Operator (=) Section 7.2 Mathematical Operators Section 7.3 Increment and Decrement Operators Section 7.4 Relational Operators Chapter 8 Classes and Objects Section 8.1 Defining Classes Section 8.2 Method Arguments Section 8.3 Constructors Section 8.4 Initializers Section 8.5 Copy Constructors Section 8.6 The this Keyword Section 8.7 Static and Instance Members Section 8.8 Destroying Objects Chapter 9 Inside Methods Section 9.1 Overloading Methods Section 9.2 Encapsulating Data with Properties Section 9.3 Returning Multiple Values Chapter 10 Basic Debugging Section 10.1 Setting a Breakpoint Section 10.2 The Call Stack Chapter 11 Inheritance and Polymorphism Section 11.1 Specialization and Generalization Section 11.2 Inheritance Section 11.3 Polymorphism Section 11.4 Abstract Classes Section 11.5 Sealed Classes Section 11.6 The Root of All Classes: Object Section 11.7 Boxing and Unboxing Types Chapter 12 Operator Overloading Section 12.1 Using the operator Keyword Section 12.2 Creating Useful Operators Section 12.3 Logical Pairs Section 12.4 Conversion Operators Chapter 13 Structs Section 13.1 Defining a Struct Chapter 14 Interfaces Section 14.1 Implementing an Interface Section 14.2 Implementing More Than One Interface Section 14.3 Casting to an Interface Section 14.4 Extending Interfaces Section 14.5 Combining Interfaces Section 14.6 Overriding Interface Implementations Section 14.7 Explicit Interface Implementation Chapter 15 Arrays Section 15.1 Arrays Section 15.2 Multidimensional Arrays Section 15.3 System.Array Section 15.4 Indexers Chapter 16 Collection Interfaces and Types Section 16.1 The Collection Interfaces Section 16.2 Array Lists Section 16.3 Queues Section 16.4 Stacks Section 16.5 Copying from a Collection Type to an Array Chapter 17 Strings Section 17.1 Creating Strings Section 17.2 Manipulating Strings Section 17.3 Regular Expressions Section 17.4 The Regex Class Chapter 18 Throwing and Catching Exceptions Section 18.1 Throwing Exceptions Section 18.2 Searching for an Exception Handler Section 18.3 The throw Statement Section 18.4 The try and catch Statements Section 18.5 How the Call Stack Works Section 18.6 Creating Dedicated catch Statements Section 18.7 The finally Statement Section 18.8 Exception Class Methods and Properties Section 18.9 Custom Exceptions Chapter 19 Delegates and Events Section 19.1 Delegates Section 19.2 Multicasting Section 19.3 Events Afterword Where to Go from Here Advanced Topics in C# Web (ASP.NET) Programming Windows Forms Programming Other Resources C# Keywords A B C D E F G I L N O P R S T U V W Colophon Index Copyright © 2002 O'Reilly & Associates, Inc All rights reserved Printed in the United States of America Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O'Reilly & Associates books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (http://safari.oreilly.com) For more information contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O'Reilly & Associates, Inc was aware of a trademark claim, the designations have been printed in caps or initial caps The association between the image of a goldfish and the topic of Learning C# is a trademark of O'Reilly & Associates, Inc While every precaution has been taken in the preparation of this book, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein Preface In July 2000, Microsoft announced the release of its new NET platform, which represented a major change in the way people think about programming .NET facilitates object-oriented Internet development C# is a programming language that was developed specifically for the purpose of writing applications for the NET platform C# builds on lessons learned from other languages, like C (high performance), Java (high security), and Visual Basic (rapid development) And this new language is ideally suited for developing distributed web applications About This Book Learning C# is a primer on the C# language, in the context of the NET development environment, and also on object-oriented programming This book focuses on the fundamentals of the C# programming language, both syntactical and semantic After mastering these concepts, you should be ready to move on to a more advanced programming guide that will help you create large-scale web and Windows applications Afterword, provides a number of suggestions for your continued study of C# and NET development Who This Book Is For Learning C# was written for programmers with little or no object-oriented programming experience, as well as for novice programmers Those coming from another language may have a slight advantage, but I've tried to provide an on-ramp for beginners as well, by defining all terms, demonstrating the relationships among the various constructs, and reviewing key concepts along the way [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] question mark (?), ternary operator Queue class queues copying to arrays QuickWatch window, VS.NET debugger [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] Rank property, System.Array class rational numbers, types for read-only properties readonly keyword reassignment operator rectangular arrays 2nd red dot and red highlighting, in VS.NET debugger ref keyword 2nd reference types arrays as classes as value types being treated as ReferenceEquals() method, Object class Regex class Regex constructor regular expressions book about literals in metacharacters in relational operators remainder in division, finding Remove() method StringBuilder class System.String class RemoveAt() method, ArrayList class Replace() method Regex class StringBuilder class Reset() method, IEnumerator interface responsibilities of an object return statement Reverse() method ArrayList class System.Array class root class rows, in two-dimensional array Run() method 2nd runtime [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] sbyte type 2nd 3rd scope, local sealed classes 2nd sealed structs self-assignment operators 2nd semantics 2nd 3rd semicolon (;) at end of statements 2nd server set accessors 2nd 3rd set() method 2nd 3rd 4th Shift-F11 keyboard shortcut short type 2nd 3rd signature of a method 2nd signed numeric types sizeof operator slashes and asterisks (/* */), enclosing comments and equals sign (/=), division self-assignment operator one (/), division operator three (///), beginning comments two (//), beginning comments Solution Explorer window in IDE solutions, VS.NET Sort() method ArrayList class System.Array class source code 2nd [See also applications; debugger]3rd .cs extension for compiling maintenance of spaces in code specialization 2nd 3rd [See also inheritance] Split() method Regex class System.String class 2nd square brackets ([]) array index operator in array declarations[square brackets ([]) array declarations in indexer declarations[square brackets ([]) indexer declarations in jagged array declaration string index operator in syntax specification Stack class stack, call [See call stack] stack, memory stackalloc operator stacks copying to arrays StackTrace property, Exception class Start icon, VS.NET Start Page, VS.NET StartsWith() method, System.String class state accessing through properties held by member variables 2nd statements 2nd blocks of that evaluate to a value 2nd static delegates static keyword 2nd 3rd static members methods 2nd 3rd 4th variables 2nd step commands, VS.NET debugger streams string class [See System.String class] string literals creating string object with escape characters in verbatim whitespace in StringBuilder class 2nd [See also System.String class] strings 2nd [See also StringBuilder class; System.String class]3rd 4th as index for indexers comparing concatenating converting other types to copying creating inserting substring into length of locating substring within 2nd returning substring in splitting into substrings switch statement using testing for equality testing for substring at end of strongly typed language 2nd [See also types] struct keyword 2nd structs as value types classes compared to constructors for defining inheritance not supported by initialization not supported for member variables in properties in sealed implicitly stubbing out a method subscribing class 2nd substitution parameters Substring() method, System.String class 2nd substrings inserting into strings locating within a string returning from a string splitting strings into subtraction operator (-) subtraction self-assignment operator (-=) removing from multicast delegates support, for this book switch statement 2nd symbolic constants symbolic debugger 2nd [See also debugger] System.ApplicationException class, custom exceptions derived from System.Array class 2nd Length property 2nd methods and properties of System.Exception class [See Exception class] System.String class 2nd [See also StringBuilder class] Compare() method Concat() method Copy() method declaration of EndsWith() method Equals() method IndexOf() method 2nd Insert() method interfaces implemented by LastIndexOf() method Length property methods and properties for as sealed class Split() method Substring() method System.Text.StringBuilder class [See StringBuilder class] [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] tab escape character (\t) tabs in code TANSTAAFL task list in IDE technical support, for this book templates for projects ternary operator (?) text editor this keyword 2nd 3rd threads throw statement 2nd titlebar in VS.NET ToArray() method ArrayList class 2nd Queue class 2nd Stack class 2nd ToCharArray() method, System.String class ToLower() method, System.String class toolbars in VS.NET ToString() method, Object class 2nd ToUpper() method, System.String class Trim() method, System.String class TrimEnd() method, System.String class TrimStart() method, System.String class true keyword try statement 2nd 3rd two-dimensional arrays [See multidimensional arrays] typeof operator types Boolean 2nd boxing character 2nd checking compatibility of compiler warnings and errors about conversion (casting) 2nd explicit conversion of implicit conversion of operators for to string default values if not initialized intrinsic 2nd non-numeric numeric polymorphic reference 2nd 3rd unboxing value 2nd 3rd [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] uint type 2nd 3rd ulong type 2nd 3rd UML (Unified Modeling Language) unboxing value types unchecked operator unconditional branching break statement 2nd continue statement goto statement method calls as throw statement Unified Modeling Language (UML) unmanaged resources unsafe keyword unsigned numeric types ushort type 2nd 3rd using declaration using statement 2nd [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] value keyword value types 2nd array elements as intrinsic types as structs as treating as reference types variables 2nd 3rd [See also member variables] assigning a value to 2nd 3rd decrementing displaying in debugger 2nd identifier for incrementing initializing 2nd local naming 2nd reassigning values to verbatim string literals versioning vertical bar (|), grouping in regular expressions vertical bar, two (||), or operator virtual keyword 2nd 3rd marking interface methods with 2nd not used with explicity implemented methods Visual Basic NET Visual Studio NET [See VS.NET] void keyword 2nd volatile keyword VS.NET (Visual Studio NET) 2nd books about Call Stack window code completion feature of compiling with customizing to create Run() method debugger 2nd editing window help window IntelliSense technology used by 2nd 3rd as MDI application New Project dialog online help files for projects Pushpin icon running applications with Solution Explorer window solutions Start icon Start Page task list titlebar toolbars window behavior in 2nd X icon [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] warnings, compiler Watch window, VS.NET debugger web applications 2nd 3rd web programming, books about web sites NET discussion lists about this book ASP Friends lists dotnet mailing list for this book gotdotnet forum MSDN library O'Reilly & Associates while statement 2nd 3rd whitespace in programs whole numbers, types for Windows applications 2nd 3rd Windows Forms 2nd windows, behavior in VS.NET 2nd Write() method, Console class WriteLine() method, Console class 2nd 3rd [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] X icon, VS.NET ... Chapter 16 Collection Interfaces and Types Section 16.1 The Collection Interfaces Section 16.2 Array Lists Section 16.3 Queues Section 16.4 Stacks Section 16.5 Copying from a Collection Type to an Array... The C# language can be used to develop three types of applications you can run on your Windows computer: Console applications, which display no graphics Windows applications, which use the standard Windows interface Web applications, which can be accessed with a browser... Arrays are one of the collection types recognized by C# Chapter 16, describes some of the other C# collections, including stacks and queues Chapter 17, discusses the manipulation of strings of characters, the C# string class, and regular expression syntax

Ngày đăng: 25/03/2019, 17:12

Từ khóa liên quan

Mục lục

  • Learning C#

  • Table of Contents

  • Copyright

  • Preface

    • About This Book

    • Who This Book Is For

    • How the Book Is Organized

    • Conventions Used in This Book

    • Support

    • We'd Like to Hear from You

    • Acknowledgments

    • Chapter 1. C# and .NET Programming

      • Section 1.1. C# and .NET

      • Section 1.2. The .NET Platform

      • Section 1.3. The .NET Framework

      • Section 1.4. The C# Language

      • Section 1.5. The Structure of C# Applications

      • Section 1.6. The Development Environment

      • Chapter 2. Getting Started with C#

        • Section 2.1. What's in a Program?

        • Section 2.2. Your First Program: Hello World

        • Section 2.3. Examining Your First Program

        • Chapter 3. Object-Oriented Programming

          • Section 3.1. Creating Models

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan