1. Trang chủ
  2. » Công Nghệ Thông Tin

C# 2005 Programmer’s Reference - Chapter 1 doc

42 236 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 42
Dung lượng 628,32 KB

Nội dung

[...]... Field-Like Events Static/Instance Events Virtual, Sealed, Override, and Abstract Accessors Indexers Operators Unary Operators Binary Operators Conversion Operators Instance Constructors 16 9 16 9 16 9 17 0 17 1 17 1 17 1 17 1 17 2 17 2 17 3 17 4 17 4 17 4 17 5 17 6 17 7 17 7 17 8 17 9 18 0 18 0 18 0 18 1 18 1 18 1 18 1 18 2 18 2 18 3 18 4 18 5 18 5 18 5 18 6 18 7 18 9 18 9 19 0 19 0 xvii Contents Static Constructors Finalizers Summary 19 1 19 1... Operators Logical Operators Conditional Logical Operators 11 3 11 3 11 5 11 8 11 9 12 0 12 1 12 5 12 5 12 6 12 6 12 6 12 7 12 7 13 0 13 1 13 1 13 1 13 1 13 2 13 2 13 3 13 3 xv Contents Null Coalescing Operator Assignment Operators Expression Constant Expressions Boolean Expressions Summary 13 4 13 5 13 5 13 5 13 8 13 8 Chapter 10 : Statements 13 9 What are Statements? C# Statements 13 9 14 1 End Point and Reachability End Point Reachability... Declarations 14 2 14 2 14 2 14 4 14 4 14 5 14 5 14 6 14 6 14 7 Expression Statements 14 8 Selection Statements Iteration Statements Jump Statements The using Statement The yield Statement 14 8 15 4 15 6 15 8 15 9 Summary 16 0 Chapter 11 : Namespaces 16 1 What are Namespaces? 16 1 Organizing Classes Controlling Scope 16 1 16 2 Compilation Units Namespace Declarations Extern Alias Directives Using Directives 16 2 16 3 16 4 16 5 Namespace... Events Summary Chapter 16 : Enums Enum Declarations Enum Modifiers Enum Members Beware Circular References System.Enum Enum Values and Operations Summary 210 211 211 212 212 212 212 213 213 215 216 217 218 219 219 219 220 Chapter 17 : Delegates 2 21 Delegates in Action Delegate Declarations 2 21 222 Modifiers Declaring Delegates Invocation List Delegate Instantiation 222 223 223 224 Summary Chapter 18 : Exceptions... Alternative Text Editors and C# Tools Enterprise Tools - Visual Studio and Visual C# Summary ix xxiii xxiii xxiii xxiv xxv xxv xxvi xxvi xxvi xxvii 1 1 1 2 2 2 3 3 3 5 6 7 7 7 10 13 15 15 16 Contents Chapter 3: Overview of C# C# C# Basics Examining the C# Source Code Types Value Types Reference Types Predefined Types Overloading Conversions Array Types 17 17 17 18 19 19 19 19 22 22 22 Variables and Parameters... Conversions User-Defined Explicit Conversions Standard Conversions 10 6 10 7 10 7 10 7 10 7 Standard Implicit Conversions Standard Explicit Conversions User-Defined Conversions 10 7 10 8 10 8 Anonymous Method Conversions Method Group Conversions Null Type Conversions 10 9 10 9 10 9 Nullable Conversions Summary Chapter 9: Expressions Classifications of Expressions 10 9 11 0 11 1 11 1 Results of an Expression 11 2 Expression... 19 2 Chapter 13 : Structs 19 3 What are Structs? Struct Declarations 19 3 19 4 Struct Struct Struct Struct Modifiers Interfaces Body Members Differences Between Class and Struct 19 5 19 5 19 5 19 5 19 6 Value Semantics Inheritance Assignments Default Values Boxing/Unboxing this Field Initializers Constructors Finalizers Static Constructors 19 7 19 7 19 8 19 8 19 8 19 8 19 9 19 9 19 9 19 9 When to Use Structs Summary 19 9... Enumeration Conversions Implicit Reference Conversions Boxing Conversions Implicit Type Parameter Conversions Implicit Constant Expression Conversions User Defined Implicit Conversions Explicit Conversions Explicit Numeric Conversions Explicit Enumeration Conversions xiv 83 84 85 85 86 87 87 88 88 89 89 90 90 98 99 99 10 0 10 0 10 1 10 1 10 2 10 2 10 3 10 3 10 3 10 3 10 5 Contents Explicit Reference Conversions Unboxing... different statements ❑ Chapter 11 : Namespaces This chapter takes a look at how C# utilizes namespaces, which allows for disambiguation of items having the same name ❑ Chapter 12 : Classes In this chapter we examine classes and how they are used to compartmentalize code in C# ❑ Chapter 13 : Structs In this chapter we look at structs and how to use them in your coding ❑ Chapter 14 : Arrays Arrays are a... and work with In this chapter we look at the different sorts of arrays available in C# ❑ Chapter 15 : Interfaces In this chapter we examine interfaces in C# and look at declarations, members, qualified member names, and implementations ❑ Chapter 16 : Enums Enums are strongly typed constants, and in this chapter we examine how they are used in C# coding ❑ Chapter 17 : Delegates This chapter looks at delegate . C# 2005 Programmer’s Reference Adrian Kingsley-Hughes Kathie Kingsley-Hughes 01_ 046 414 ffirs.qxp 10 /4/06 11 : 21 AM Page iii 01_ 046 414 ffirs.qxp 10 /4/06 11 : 21 AM Page ii C# 2005 Programmer’s Reference 01_ 046 414 . Reference 01_ 046 414 ffirs.qxp 10 /4/06 11 : 21 AM Page i 01_ 046 414 ffirs.qxp 10 /4/06 11 : 21 AM Page ii C# 2005 Programmer’s Reference Adrian Kingsley-Hughes Kathie Kingsley-Hughes 01_ 046 414 ffirs.qxp 10 /4/06. Data Kingsley-Hughes, Adrian. C# 2005 programmer’s reference / Adrian Kingsley-Hughes, Kathie Kingsley-Hughes. p. cm. ISBN -1 3 : 97 8-0 -4 7 0-0 464 1- 8 (paper/website) ISBN -1 0 : 0-4 7 0-0 464 1- 4 (paper/website) 1. C# (Computer

Ngày đăng: 12/08/2014, 09:23

TỪ KHÓA LIÊN QUAN