没有合适的资源?快使用搜索试试~ 我知道了~
首页Visual C# 2010速成指南:实战与升级
Visual C# 2010速成指南:实战与升级
4星 · 超过85%的资源 需积分: 10 79 下载量 59 浏览量
更新于2024-07-29
收藏 11.17MB PDF 举报
《Microsoft Visual C# 2010 Step by Step 中文版》是一本针对Visual C#语言初学者和进阶开发者设计的教程,作者John Sharp以浅显易懂的方式讲解C#编程语言。该书与Microsoft的Visual Studio IDE紧密结合,强调实践与理论相结合的学习方法,不同于单纯罗列语法的教材。
书中特别提到了几个关键点:
1. 学习前须准备:读者需要下载并安装配套代码包,可以从作者提供的网盘链接(http://transbot.ys168.com)找到VisualC#2010从入门到精通的文件夹,选择名为Steup.exe的文件进行安装。此外,译者周靖指出,虽然翻译初稿提供参考,但全本图书会包含更多详细内容和勘误修正。
2. C#语言特性:C#是一种面向对象的语言,设计目的是在.NET Framework上构建高效、安全的应用程序。它结合了C语言的简洁性和Python的优雅,支持快速开发。Visual C#是Microsoft在C#上的实现,Visual Studio则提供了完整的开发环境,包括强大的编辑器、编译器、设计工具等。
3. 教学方法:本书采用实例驱动教学,通过丰富的实际案例引导读者逐步掌握C#的基础概念,如控制台应用、WPF窗体应用、“HelloWorld”程序,以及更复杂的数据库应用、多线程编程和WCF Web服务。与上一版相比,新版本针对C# 4.0做了大量更新和补充,适合不同水平的读者选择性学习。
4. 适用人群:无论是初次接触C#的初学者,还是有一定经验的开发者,都能从中受益。对于新手,可以按照章节顺序系统学习;对于经验者,则可以根据自己的兴趣和需求选择阅读部分。
《Microsoft Visual C# 2010 Step by Step 中文版》是一本实用性很强的教程,通过实践操作和深度剖析,帮助读者迅速上手C#编程,适应.NET Framework下的软件开发。
16
10.1.3
初始化数组变量
········································································································· 202
10.1.4
创建隐式类型的数组
································································································· 203
10.1.5
访问单独的数组元素
································································································· 203
10.1.6
遍历数组
····················································································································· 204
10.1.7
复制数组
····················································································································· 205
10.1.8
使用多维数组
············································································································· 206
10.1.9
使用数组来玩牌
········································································································· 207
10.2 什么是集合类 ····················································································································· 213
10.2.1 ArrayList
集合类
·········································································································· 214
10.2.2 Queue
集合类
·············································································································· 216
10.2.3 Stack
集合类
················································································································ 217
10.2.4 Hashtable
集合类
········································································································ 218
10.2.5 SortedList
集合类
········································································································· 219
10.2.6
使用集合初始化器
····································································································· 220
10.2.7
比较数组和集合
········································································································· 221
10.2.8
使用集合类来玩牌
····································································································· 221
第 10 章快速参考 ·························································································································· 225
第 11 章 理解参数数组 ·········································································································· 226
11.1 使用数组参数 ····················································································································· 227
11.1.1
声明
params
数组
······································································································· 228
11.1.2
使用
params object[] ··································································································· 229
11.1.3
使用
params
数组
······································································································· 231
11.2 比较参数数组和可选参数 ·································································································· 233
第 11 章快速参考 ·························································································································· 236
第 12 章 使用继承 ··················································································································237
12.1 什么是继承 ························································································································· 237
12.2 使用继承 ····························································································································· 238
12.2.1
调用基类构造器
········································································································· 239
12.2.2
类的赋值
····················································································································· 242
12.2.3
声明
new
方法
············································································································· 243
12.2.4
声明
virtual
方法
········································································································· 244
12.2.5
声明
override
方法
······································································································ 245
12.2.6
理解
protected
访问
···································································································· 248
12.3 理解扩展方法 ····················································································································· 253
第 12 章快速参考 ·························································································································· 257
第 13 章 创建接口和定义抽象类 ··························································································· 259
17
13.1 理解接口 ····························································································································· 259
13.1.1
定义接口
······················································································································ 260
13.1.2
实现接口
···················································································································· 260
13.1.3
通过接口来引用一个类
····························································································· 262
13.1.4
使用多个接口
············································································································ 262
13.1.5
显式实现接口
············································································································ 263
13.1.6
接口的限制
················································································································· 264
13.1.7
定义和使用接口
········································································································· 265
13.2 抽象类 ································································································································· 273
13.2.1
抽象方法
····················································································································· 275
13.3 密封类 ································································································································· 275
13.3.1
密封方法
····················································································································· 275
13.3.2
实现并使用一个抽象类
································································································· 276
第 13 章快速参考 ·························································································································· 280
第 14 章 使用垃圾回收和资源管理 ······················································································· 281
14.1 对象的生存期 ····················································································································· 281
14.1.1
编写析构器
················································································································· 283
14.1.2
为什么要使用垃圾回收器
·························································································· 285
14.1.3
垃圾回收器的工作机理
······························································································ 287
14.1.4
慎用析构器
················································································································· 287
14.2 资源管理 ····························································································································· 289
14.2.1 disposal
方法
··············································································································· 289
14.2.2
异常安全的
disposal
方法
·························································································· 290
14.2.3 using
语句
···················································································································· 290
14.2.4
从析构器中调用
Dispose
方法
··················································································· 293
14.3 实现异常安全的 DISPOSAL ···································································································· 294
第 14 章快速参考 ·························································································································· 296
第 III 部分 创建组件 ·············································································································· 298
第 15 章 实现属性以访问字段 ······························································································· 298
15.1 使用方法来实现封装 ········································································································· 299
15.2 什么是属性 ························································································································· 301
15.2.1
使用属性
····················································································································· 302
15.2.2
只读属性
····················································································································· 303
15.2.3
只写属性
····················································································································· 303
15.2.4
属性的可访问性
········································································································· 304
15.3 理解属性的局限性 ············································································································· 305
18
15.3.1
合理使用属性
············································································································· 306
15.4 在接口中声明属性 ············································································································· 306
在
Windows
应用程序中使用属性
·························································································· 308
15.5 生成自动属性 ····················································································································· 309
15.6 使用属性来初始化对象 ····································································································· 310
第 15 章快速参考 ·························································································································· 315
第 16 章 使用索引器 ·············································································································· 316
16.1 什么是索引器 ····················································································································· 317
16.1.1
没有使用索引器的例子
······························································································ 317
16.1.2
使用索引器的同一个例子
·························································································· 318
16.1.3
理解索引器的
accessor ······························································································· 320
16.1.4
对比索引器和数组
····································································································· 321
16.2 接口中的索引器 ················································································································· 323
16.3 在 WINDOWS 应用程序中使用索引器 ················································································· 324
第 16 章快速参考 ·························································································································· 330
第 17 章 中断程序流程并处理事件 ··························································································· 331
17.1 声明和使用委托 ················································································································· 331
17.1.1
自动化工厂的例子
····································································································· 332
17.1.2
不使用委托来实现工厂
······························································································ 332
17.1.3
使用委托来实现工厂
·································································································· 333
17.1.4
使用委托
····················································································································· 335
17.2 LAMBDA 表达式和委托 ········································································································· 340
17.2.1
创建方法适配器
········································································································· 340
17.2.2
将
lambda
表达式作为适配器使用
··········································································· 341
17.2.3 lambda
表达式的形式
································································································ 341
17.3 启用事件通知 ····················································································································· 343
17.3.1
声明事件
····················································································································· 343
17.3.2
订阅事件
····················································································································· 344
17.3.3
取消订阅事件
············································································································· 345
17.3.4
引发事件
····················································································································· 345
17.4 理解 WPF 用户界面事件 ···································································································· 346
17.4.1
使用事件
····················································································································· 347
第 17 章快速参考 ·························································································································· 351
第 18 章 泛型概述 ················································································································· 353
18.1 OBJECT 存在的问题 ··············································································································· 353
18.2 泛型解决方案 ····················································································································· 356
19
18.2.1
对比泛型类与泛化类
································································································· 359
18.2.2
泛型和约束
················································································································· 359
18.3 创建泛型类 ························································································································· 359
18.3.1
二叉树理论
················································································································· 359
18.3.2
使用泛型构造二叉树类
······························································································ 363
18.4 创建泛型方法 ······················································································································372
18.4.1
定义泛型方法来构造二叉树
······················································································ 373
18.5 可变性和泛型接口 ············································································································· 375
18.5.1
协变接口
······················································································································ 376
18.5.2
逆变接口
····················································································································· 378
第 18 章快速参考 ·························································································································· 380
第 19 章 枚举集合 ················································································································· 381
19.1 枚举集合中的元素 ············································································································· 381
19.1.1
手动实现枚举器
········································································································· 382
19.1.2
实现
IEnumerable
接口
······························································································· 386
19.2 使用迭代器来实现枚举器 ·································································································· 388
19.2.1
一个简单的迭代器
····································································································· 388
19.2.2
使用迭代器为
Tree<TItem>
类定义枚举器
································································ 390
第 19 章快速参考 ·························································································································· 392
第 20 章 使用查询表达式来查询内存中的数据 ····································································· 393
20.1 什么是语言集成查询 ········································································································· 394
20.2 在 C#应用程序中使用 LINQ ······························································································· 394
20.2.1
选择数据
····················································································································· 396
20.2.2
筛选数据
····················································································································· 398
20.2.3
排序、分组和聚合数据
······························································································ 399
20.2.4
联接数据
····················································································································· 401
20.2.5
使用查询操作符
········································································································· 403
20.2.6
查询
Tree<TItem>
对象中的数据
················································································ 405
20.2.7 LINQ
和推迟求值
········································································································· 410
第 20 章快速参考 ·························································································································· 414
第 21 章 操作符重载 ·············································································································· 415
21.1 理解操作符 ································ ························································································· 416
21.1.1
操作符的限制
············································································································· 416
21.1.2
重载的操作符
············································································································· 417
21.1.3
创建对称操作符
········································································································· 418
21.2 理解复合赋值 ····················································································································· 420
20
21.3 声明递增操作符和递减操作符 ·························································································· 421
21.4 比较结构和类中的操作符 ·································································································· 422
21.5 定义操作符对 ····················································································································· 422
21.6 实现操作符 ························································································································· 424
21.7 理解转换操作符 ················································································································· 429
21.7.1
提供内建转换
············································································································· 430
21.7.2
实现用户自定义的转换操作符
·················································································· 431
21.7.3
再论创建对称操作符
································································································· 432
21.7.4
添加隐式转换操作符
································································································· 433
第 21 章快速参考 ·························································································································· 436
第 IV 部分 操纵 WINDOWS 应用程序 ·····················································································437
第 22 章 WINDOWS PRESENTATION FOUNDATION 概述 ··························································437
22.1 创建 WPF 应用程序 ············································································································ 438
生成
WPF
应用程序
·················································································································· 438
22.2 在窗体上添加控件 ············································································································· 452
22.2.1
使用
WPF
控件
············································································································ 452
22.2.2
动态更改属性
············································································································· 460
22.3 处理 WPF 窗体中的事件 ···································································································· 464
处理
Windows
窗体中的事件
·································································································· 464
第 22 章快速参考 ·························································································································· 468
第 23 章 收集用户输入 ·········································································································· 469
23.1 菜单设计原则和样式 ··········································································································470
23.2 菜单和菜单事件 ················································································································· 471
23.2.1
创建菜单
····················································································································· 471
23.2.2
处理菜单事件
··············································································································476
23.3 快捷菜单 ····························································································································· 482
创建快捷菜单
··························································································································· 482
23.4 WINDOWS 通用对话框 ·········································································································· 486
使用
SaveFileDialog
类
·············································································································· 486
23.5 增强 WPF 应用程序的响应能力 ························································································ 489
第 23 章快速参考 ·························································································································· 498
第 24 章 执行校验 ················································································································· 499
24.1 验证数据 ····························································································································· 500
用户输入验证策略
··················································································································· 500
24.2 示例:订票系统 ················································································································· 500
剩余284页未读,继续阅读
2010-04-09 上传
2012-09-28 上传
2012-08-28 上传
点击了解资源详情
2018-07-19 上传
2010-04-02 上传
2010-04-28 上传
2011-08-09 上传
karotte
- 粉丝: 28
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 深入了解Django框架:Python中的网站开发利器
- Spring Boot集成框架示例:深入理解与实践
- 52pojie.cn捷速OCR文字识别工具实用评测
- Unity实现动态水体涟漪效果教程
- Vue.js项目实践:饭否每日精选日历Web版开发记
- Bootbox:用Bootstrap实现JavaScript对话框新体验
- AlarStudios:Swift开发教程及资源分享
- 《火影忍者》主题新标签页壁纸:每日更新与自定义天气
- 海康视频H5player简易演示教程
- -roll20脚本开发指南:探索roll20-master包-
- Xfce ClassicLooks复古主题更新,统一Linux/FreeBSD外观
- 自建物理引擎学习刚体动力学模拟
- Python小波变换工具包pywt的使用与实例
- 批发网导航程序:自定义模板与分类标签
- 创建交互式钢琴键效果的JavaScript库
- AndroidSunat应用开发技术栈及推介会议
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功