Sams Teach Yourself C# in 21 Days
暫譯: Sams 自學 C# 21 天入門指南

Bradley L. Jones

  • 出版商: SAMS
  • 出版日期: 2001-10-19
  • 售價: $1,740
  • 貴賓價: 9.5$1,653
  • 語言: 英文
  • 頁數: 784
  • 裝訂: Paperback
  • ISBN: 0672320711
  • ISBN-13: 9780672320712
  • 相關分類: C#
  • 已過版

買這商品的人也買了...

相關主題

商品描述

This book will take you, step by step, through learning C#, the computer industry's newest and most productive language. This complete guide covers topics from basic program construction to intermediate level application engineering. Following "21 days" formula, this book is a three week intensive course for the beginning programmer who wishes to get started with this exiting new coding standard. The comprehensive lesson plan will enable the reader to understand, design and build applications that are compatible with the new Microsoft .net framework.

Table of Contents

Introduction.

WEEK 1. AT A GLANCE.

Day 1. Getting Started with C#.

What Is C#? Why C#? C# Versus Other Programming Languages. Preparing to Program. The Program Development Cycle. Your First C# Program. Types of C# Programs.


Day 2. Understanding C# Programs.

C# Applications. Basic Parts of a C# Application. Structure of a C# Application. Analysis of Listing 2.1. Object-Oriented Programming (OOP). Displaying Basic Information.


Day 3. Storing Information with Variables.

Variables. Using Variables. Understanding Your Computer's Memory. C# Data Types. Numeric Variable Types. Literals Versus Variables. Constants. Reference Types.


Day 4. Working with Operators.

Types of Operators. Punctuators. The Basic Assignment Operator. Mathematical/Arithmetic Operators. Relational Operators. Logical Bitwise Operators. Type Operators. The sizeof Operator. The Conditional Operator. Understanding Operator Precedence. Converting Data Types. Understanding Operator Promotion. For Those Brave Enough.


Day 5. Control Statements.

Controlling Program Flow. Using Selection Statements. Using Iteration Statements. Using goto. Nesting Flow.


Day 6. Classes.

Object-Oriented Programming Revisited. Defining a Class. Class Declarations. Data Members, aka Fields. Static Variables. The Application Class. Properties. A First Look at Namespaces.


Day 7. Class Methods and Member Functions.

Getting Started with Methods. Using Methods. Program Flow with Methods. Format of a Method. Passing Values to Methods. Types of Class methods.


Week 1. In Review.

The WR01.cs Program

WEEK 2. AT A GLANCE.


Day 8. Advanced Data Storage: Structures, Enumerators, and Arrays.

Structures. Enumerators. Using Arrays to Store Data.


Day 9. Advanced Method Access.

Overloading Methods. Using a Variable Number of Parameters. Scope. Classes with No Objects. Namespaces Revisited.


Day 10. Handling Exceptions.

The Concept of Handling Problems. Exception Handling. Adding Finality with finally. Common Exceptions. Defining Your Own Exception Classes. Throwing Your Own Exceptions. checked Versus unchecked Statements.


Day 11. Inheritance.

The Basics of Inheritance. Polymorphism and Inherited Classes. Virtual Methods. Working with Abstract Classes. Sealing Classes. The Ultimate Base Class: Object. Using the is and as Keywords with Classes—Class Conversions. Arrays of Different Object Types.


Day 12. Better Input and Output.

Understanding Console Input and Output. Formatting Information. Working Closer with Strings. Getting Information from the Console.


Day 13. Interfaces.

Interfaces—A First Look. Defining Interfaces. Using Multiple Interfaces. Explicit Interface Members. Deriving New Interfaces from Existing Ones. Hiding Interface Members.


Day 14. Indexers, Delegates, and Events.

Using an Indexer. Exploring Delegates. Working with Events. Creating Events.


Week 2. In Review.

Enumerations for the Cards. A card Type. A deck Class. The Card Game. Looking at the Entire Deck.

WEEK 3. AT A GLANCE.


Day 15. Using the .NET Bases Classes.

Classes in the .NET Framework. Working with a Timer. Getting Directory and System Environment Information. Working with Math Routines. Working with Files. Working with Data Files.


Day 16. Creating Windows Forms.

Working with Windows and Forms. Creating Windows Forms. Customizing a Form's Look and Feel. Adding Controls to a Form.


Day 17. Creating Windows Applications.

Working with Radio Buttons. Working with List Boxes. Adding Menus to Your Forms. Displaying Pop-Up Dialogs and Forms.


Day 18. Web Development.

Creating Web Applications. The Concept of a Component. Web Services. Creating Regular Web Applications.


Day 19. Two D's in C#—Directives and Debugging.

What Is Debugging? Types of Errors. Finding Errors. Code Walkthroughs: Tracing Code. Preprocessor Directives. Using Debuggers.


Day 20. Operator Overloading.

Overloading Functions Revisited. Operator Overloading.


Day 21. A Day for Reflection and Attributes.

Reflection. Attributes. Congratulations!


Week 3. In Review.

Apply What You Know. Show What You Know.

APPENDIXES.


Appendix A: Answers.
Appendix B: C# Keywords.

abstract. as. base. bool. break. byte. case. catch. char. checked. class. const. continue. decimal. default. delegate. do. double. else. enum. event. explicit. extern. false. finally. fixed. float. for. foreach. get. goto. if. implicit. in. int. interface. internal. is. lock. long. namespace. new. null. object. operator. out. override. params. private. protected. public. readonly. ref. return. sbyte. sealed. set. short. sizeof. stackalloc. static. string. struct. switch. this. throw. true. try. typeof. uint. ulong. unchecked. unsafe. ushort. using. value. virtual. void. while.


Appendix C. C# Command-Line Compiler Flags.

Output. Input. Resource. Code Generation. Errors and Warnings. Programming Language. Miscellaneous. Advanced.


Appendix D. Understanding Different Number Systems.

The Decimal Number System. The Binary System. The Hexadecimal System.


Index.

商品描述(中文翻譯)

這本書將逐步引導您學習 C#,這是計算機行業最新且最具生產力的語言。本完整指南涵蓋從基本程式構建到中級應用工程的主題。根據「21天」的公式,這本書是一個為期三週的密集課程,適合希望開始學習這一令人興奮的新編碼標準的初學者。全面的課程計劃將使讀者能夠理解、設計和構建與新的 Microsoft .net 框架兼容的應用程序。

目錄

引言。

第一週 概覽。
第1天 開始使用 C#。
C# 是什麼?為什麼選擇 C#?C# 與其他編程語言的比較。準備編程。程式開發週期。您的第一個 C# 程式。C# 程式的類型。

第2天 理解 C# 程式。
C# 應用程序。C# 應用程序的基本部分。C# 應用程序的結構。清單 2.1 的分析。物件導向程式設計 (OOP)。顯示基本信息。

第3天 使用變數存儲信息。
變數。使用變數。理解計算機的記憶體。C# 數據類型。數值變數類型。字面量與變數。常量。引用類型。

第4天 使用運算符。
運算符的類型。標點符號。基本賦值運算符。數學/算術運算符。關係運算符。邏輯位運算符。類型運算符。sizeof 運算符。條件運算符。理解運算符優先級。轉換數據類型。理解運算符提升。對於勇敢者。

第5天 控制語句。
控制程式流程。使用選擇語句。使用迭代語句。使用 goto。嵌套流程。

第6天 類。
物件導向程式設計回顧。定義類。類聲明。數據成員,即字段。靜態變數。應用程序類。屬性。命名空間的初步了解。

第7天 類方法和成員函數。
開始使用方法。使用方法。使用方法的程式流程。方法的格式。將值傳遞給方法。類方法的類型。

第一週 回顧。
WR01.cs 程式

第二週 概覽。
第8天 高級數據存儲:結構、列舉和數組。
結構。列舉。使用數組存儲數據。

第9天 高級方法訪問。
方法重載。使用可變數量的參數。範圍。沒有對象的類。命名空間回顧。

第10天 處理異常。
處理問題的概念。異常處理。使用 finally 添加最終性。常見異常。定義自己的異常類。拋出自己的異常。checked 與 unchecked 語句。

第11天 繼承。
繼承的基本概念。多態性和繼承類。虛擬方法。使用抽象類。封閉類。終極基類:Object。使用 is 和 as 關鍵字進行類轉換。不同對象類型的數組。

第12天 更好的輸入和輸出。
理解控制台輸入和輸出。格式化信息。更深入地處理字符串。從控制台獲取信息。

第13天 介面。
介面——初步了解。定義介面。使用多個介面。顯式介面成員。從現有介面派生新介面。隱藏介面成員。

第14天 索引器、委託和事件。
使用索引器。探索委託。處理事件。創建事件。

第二週 回顧。
卡片的列舉。一種卡片類型。一副牌類。卡牌遊戲。查看整副牌。

第三週 概覽。
第15天 使用 .NET 基類。
.NET 框架中的類。使用計時器。獲取目錄和系統環境信息。使用數學例程。處理文件。處理數據文件。

第16天 創建 Windows 表單。
處理 Windows 和表單。創建 Windows 表單。自定義表單的外觀和感覺。向表單添加控件。

第17天 創建 Windows 應用程序。
處理單選按鈕。處理列表框。向表單添加菜單。顯示彈出對話框和表單。

第18天 網頁開發。
創建網頁應用程序。組件的概念。網絡服務。創建常規網頁應用程序。

第19天 C# 中的兩個 D——指令和調試。
什麼是調試?錯誤的類型。查找錯誤。代碼逐步執行:跟蹤代碼。預處理指令。使用調試器。

第20天 運算符重載。
重載函數回顧。運算符重載。

第21天 反思與屬性的一天。
反思。屬性。恭喜!

第三週 回顧。
應用您所知道的。展示您所知道的。

附錄。
附錄 A:答案。附錄 B:C# 關鍵字。
abstract。as。base。bool。break。byte。case。catch。char。checked。class。const。continue。decimal。default。delegate。do。double。else。enum。event。explicit。extern。false。finally。fixed。float。for。foreach。get。goto。if。implicit。in。int。interface。internal。is。lock。long。namespace。new。null。object。operator。out。override。params。private。protected。public。readonly。ref。return。sbyte。sealed。set。short。sizeof。stackalloc。static。string。struct。switch。this。throw。true。try。typeof。uint。ulong。unchecked。unsafe。ushort。using。value。virtual。void。while。

附錄 C。C# 命令行編譯器標誌。
輸出。輸入。資源。代碼生成。錯誤和警告。編程語言。其他。高級。

附錄 D。理解不同的數字系統。
十進制數字系統。二進制系統。十六進制系統。

索引。