当前位置:首页 > 工业技术
C* Primer A practical approach
C* Primer A practical approach

C* Primer A practical approachPDF电子书下载

工业技术

  • 电子书积分:13 积分如何计算积分?
  • 作 者:(美)Stanley B. Lippman著
  • 出 版 社:北京:中国电力出版社
  • 出版年份:2003
  • ISBN:750831090X
  • 页数:394 页
图书介绍:本书为C#这种新的面向对象程序语言提供了全面、以实例为主的讲解。C#是Microsoft新出的.NET平台的基础。它继承了许多Java和C++的特性,并致力于成为构建高性能Windows和Web应用程序和组件(从基于XML的Web服务到中层商务对象和系统级应用程序)的一种高级程序语言。本书主要包括:基础简介,例如命名空间、异常处理和统一类型系统;对类和接口继承进行了详细讨论和充分例证,还讨论了何时使用哪一种最为合适;广泛讨论了.NET类库,包括对ADO.NET的介绍,建立数据库连接,正则表达式,线程,套接字编程,使用firehose和DOM解析模型、XSLT和XPATH的XML编程;详细讨论了ASP.NET Web Form Designer,涉及了页面生命周期和高速缓存,并提供了大量实例;介绍了.NET Common Language Runtime(CLR)。
《C* Primer A practical approach》目录
标签:

1 Hello,C 1

1.1 A First C# Program 1

1.2 Namespaces 6

1.3 Alternative Forms of the Main() Function 10

1.4 Making a Statement 11

Preface 13

1.5 Opening a Text File for Reading and Writing 17

1.6 Formatting Output 19

1.7 The string Type 21

1.8 Local Objects 24

1.9 Value and Reference Types 28

1.10 The C# Array 29

1.11 The new Expression 30

1.12 Garbage Collection 32

1.13 Dynamic Arrays:The ArrayList Collection Class 33

1.14 The Unified Type System 35

1.14.1 Shadow Boxing 36

1.14.2 Unboxing Leaves Us Downcast 37

1.15 Jagged Arrays 39

1.16 The Hashtable Container 41

1.17 Exception Handling 44

1.18.1 Keywords 47

1.18 A Basic Language Handbook for C 47

1.18.2 Built-in Numeric Types 49

1.18.3 Arithmetic,Relational,and Conditional Operators 51

1.18.4 Operator Precedence 54

1.18.5 Statements 55

2 Class Design 59

2.1 Our First Independent Class 59

2.2 Opening a New Visual Studio Project 63

2.3 Declaring Data Members 66

2.4 Properties 67

2.5 Indexers 69

2.6 Member Initialization 72

2.7 The Class Constructor 73

2.8 The Implicit this Reference 76

2.9 static Class Members 79

2.10 const and readonly Data Members 81

2.11 The enum Value Type 83

2.12 The delegate Type 86

2.13 Function Parameter Semantics 92

2.13.1 Pass by Value 94

2.13.2 Pass by Reference:The ref Parameter 96

2.13.3 Pass by Reference:The out Parameter 97

2.14 Function Overloading 99

2.14.1 Resolving Overload Functions 100

2.14.2 Determining a Best Match 101

2.15 Variable-Length Parameter Lists 103

2.16 Operator Overloading 107

2.17 Conversion Operators 110

2.18 The Class Destructor 113

2.19 The struct Value Type 113

3 Object-Oriented Programming 117

3.1 Object-Oriented Programming Concepts 117

3.2 Supporting a Polymorphic Query Language 121

3.3 Designing a Class Hierarchy 124

3.4 Object Lessons 128

3.5 Designing an Abstract Base Class 132

3.6 Declaring an Abstract Base Class 133

3.7 Static Members of an Abstract Base Class 137

3.8 A Hybrid Abstract Base Class 138

3.8.1 The Single-Inheritance Object Model 140

3.8.2 How Is a Hybrid Abstract Class Different? 141

3.9 Defining a Derived Class 143

3.10 Overriding the Inherited Virtual Interface 145

3.11 Overriding the Virtual Object Methods 146

3.12 Member Access:The new and base Modifiers 147

3.12.1 Accessibility versus Visibility 150

3.12.2 Encapsulating Base-Class Access 151

3.13 Sealing a Class 153

3.14 The Exception Class Hierarchy 154

4 Interface Inheritance 159

4.1 Implementing a System Interface:IComparable 160

4.2 Accessing an Existing Interface 163

4.3 Defining an Interface 166

4.3.1 Implementing Our Interface:Proof of Concept 168

4.3.2 Integrating Our Interface within the System Framework 174

4.4 Explicit Interface Member Implementations 178

4.5 Inherited Interface Members 180

4.6 Overloaded,Hidden,or Ambiguous? 183

4.7 Mastering Copy Semantics:ICloneable 185

4.8 Mastering Finalize Semantics:IDisposable 187

4.9 BitVector:Extension through Composition 190

5 Exploring the System Namespace 199

5.1 Supporting the Fundamental Types 199

5.2 The Array Is a system.Array 200

5.3 Querying the Environment 203

5.3.1 The Environment Class 204

5.3.2 Accessing All the Environment Variables 205

5.3.3 The Process Class 207

5.3.4 Finding the Logical Drives 208

5.4 System.IO 209

5.4.1 Handling File Extensions:The Path Class 210

5.4.2 Manipulating Directories 212

5.4.3 Manipulating Files 215

5.4.4 Reading and Writing Files 216

5.5 A System Miscellany 221

5.5.1 The System.Collections.Stack Container 221

5.5.2 The System.Diagnostics.TraceListener Class 223

5.5.3 System.Math 225

5.5.4 The DateTime Class 226

5.6 Regular Expressions 228

5.7 System.Threading 235

5.8 The Web Request/Response Model 241

5.9 System.Net.Sockets 245

5.9.1 The Server-Side TcpListener 246

5.9.2 The Client-Side TcpClient 248

5.10 System.Data 249

5.10.1 The Database Tables 250

5.10.2 Opening the Database:Selecting a Data Provider 252

5.10.3 Navigating the DataTable 254

5.10.4 Setting Up the DataRelation 257

5.10.5 Selection and Expressions 258

5.11 System.XML 259

5.11.1 Getting XML Out of Our Programs 260

5.11.2 xmlTextReader:The Firehose 265

5.11.3 Document Object Model 272

5.11.4 System.Xml.Xsl 277

5.11.5 System.Xml.XPath 279

6 Windows Forms Designer 283

6.1 Our First Windows Forms Program 283

6.2 Building the GUI 285

6.3 Implementing the Event Callback Routines 288

6.3.1 Implementing a TextBox Event 292

6.3.2 Implementing the Button Events:OK 293

6.3.3 Implementing the Button Events:Quit 295

6.4 Inspecting and Generating Control Events 295

6.4.1 Labels Are Programmable 296

6.5 Implementing the MessageBox Pop-Up Dialog 298

6.6 The List Box for Unformatted Output 299

6.7 Exploring the File Dialog 302

6.8 A Pocketful of Buttons 304

6.9 Serving Up Menus 306

6.10 The DataGrid Control 308

6.11 Adding a pictureBox Control 310

7 ASP.NET and Web Forms Designer 315

7.1 Our First Web Forms Program 316

7.2 Opening an ASP.NET Web Application Project 316

7.2.1 Modifying the Document Properties 318

7.2.2 Adding Controls to the Document:Label 319

7.3 Adding Pages to a Project 320

7.4 The HyperLink Control:Linking to Other Pages 321

7.5 The DataGrid Control 321

7.6 Understanding the Page Event Life Cycle 323

7.7 The Data Provider 325

7.8 Web State Management 326

7.8.1 Adding a TextBox Control 328

7.8.2 Adding an ImageButton Control 329

7.8.3 Adding a ListBox Control 329

7.9 Managing State:Class Members 331

7.10 Managing State:The Session Object 332

7.11 Managing State:The Application Object 333

7.12 Validation Controls 334

7.13 Adding a DropDownList Control 335

7.14 Adding a Group of RadioButton Controls 337

7.15 Adding a CheckBoxList Control 338

7.16 Adding Validators to a Control 340

7.17 Adding a Calendar Control 344

7.18 Adding an Image Control 345

7.19 Programming Web Server Controls 345

8 The Common Language Runtime 349

8.1 Assemblies 349

8.2 Runtime Type Reflection 353

8.3 Modifying the Retrieval through BindingFlags 358

8.4 Invoking a Method during Runtime 362

8.5 Delegating the Test to Reflection 364

8.6.1 The Intrinsic Conditional Attribute 367

8.6 Attributes 367

8.6.2 The Intrinsic Serializable Attribute 369

8.6.3 The Intrinsic Dllimport Attribute 370

8.7 Implementing Our Own Attribute Class 372

8.7.1 Positional and Named Parameters 375

8.7.2 AttributeUsage 376

8.8 Runtime Discovery of Attributes Using Reflection 376

8.9 The Intermediate Language 378

8.9.1 Examining the Intermediate Language 379

8.9.2 The ildasm Tool 381

Index 385

返回顶部