C#编程思想
基本信息
- 作者:
嘉木工作室
- 丛书名: 其他
- 出版社:机械工业出版社*
- ISBN:711111860X
- 上架时间:2003-6-5
- 出版日期:2003 年5月
- 开本:16开
- 页码:336
- 版次:1-1
- 所属分类:
计算机 > 软件与程序设计 > C#
编辑推荐
本书从基础入门,结合Web开发的特点,详细介绍C#开发语言的语法,并针对这些语法提供了丰富的例程,以充分发挥C#语言的开发优势。该C#开发语言是包含在Visual Studio.NET框架中的最新应用程序开发语言。目前,随着网络应用程序的广泛开发与应用需求,C#已经成为开发基于计算机和通信的最流行的语言。
该C#开发语言是包含在Visual Studio.NET框架中的最新应用程序开发语言。目前,随着网络应用程序的广泛开发与应用需求,C#已经成为开发基于计算和通信的最流行的语言。本书从基础入门,结合Web开发的特点,详细介绍C#开发语言的语法,并针对这些语法提供了丰富的例程,以充分发挥C#语言的开发优势。
本书适合从事网络程序设计的程序员、大中专院校相关专业师生和培训学校学生。
第1章 c#简介
1.1 开始(start)
1.2 类型(types)
1.2.1 预定义类型(predefined type)
1.2.2 转换(conversion)
1.2.3 数组类型(array)
1.2.4 类型系统的统一(type system unification)
1.3 变量与参数(variables and parameters)
1.4 自动内存管理(automatic memory management)
1.5 表达式(expressions)
1.6 语句(statements)
1.7 类(class)
1.7.1 常量(constants)
1.7.2 域(fields)
1.7.3 方法(methods)
1.7.4 属性(properties)
1.7.5 事件(event)
1.7.6 操作符(operators)
1.7.7 索引(index)
1.7.8 实例构造函数(instance constructors)
.1.7.9 析构函数(destructors)
1.7.10 静态构造函数(static constructors)
1.7.11 继承(inheritance)
1.8 结构(structs)
1.9 接口(interfaces)
1.10 委托(delegates)
1.11 枚举(enums)
1.12 名字空间与汇编(namespaces and assemblies)
1.13 版本(versioning)
1.14 属性(attributes)
第2章 词法结构
2.1 翻译阶段(phases of translation)
2.2 语法符号(grammar notation)
2.3 词法分析(lexical analysis)
2.3.1 输入(input)
2.3.2 字符输入(input characters)
2.3.3 线终端函数(line terminators)
2.3.4 注释(comments)
2.3.5 空格(white space)
2.4 标识符(tokens)
2.4.1 单码字符转义序列(unicode character escape sequences)
2.4.2 标识符(identifiers)
2.4.3 关键字(keywords)
2.4.4 字母(literals)
2.4.5 操作符与标点符号(operators and punctuators)
2.5 预处理指令(pre-processing directive)
2.5.1 预处理标识符(pre-processing identifiers)
2.5.2 预处理表达式(preprocessing expressions)
2.5.3 预处理声明(pre-processing declarations)
2.5.4 #if,#elif,#else,#endif
2.5.5 #error和#waring
2.5.6 #region和#endregion
2.5.7 #lime
第3章 基本概念
3.1 程序开始(program startup)
3.2 程序结束(progarm termination)
3.3 声明(declarations)
3.4 元素(members)
3.4.1 名字空间元素(nanespace members)
3.4.2 结构成员(struct members)
3.4.3 枚举成员(enumeration members)
3.4.4 类项(class member)
3.4.5 接口成员(interface members)
3.4.6 数组项(array members)
3.4.7 委托成员(delegate members)
3.5 成员访问(member access)
3.5.1 声明的可访问性(declared accessibility)
3.5.2 可访问域(accessibility domains)
3.5.3 访问保护(protected access)
3.5.4 访问约束(accessibility constraints)
3.6 签名和重载(signatures and overloading)
3.7 范围(scopes)
3.7.1 名字的范围(name scopes)
3.7.2 名字隐藏(name hiding)
3.8 名字空间和类型名字(namespace and type names)
第4章 类型
4.1 值类型(value types)
4.1.1 默认构造函数(default constructors)
4.1.2 结构类型(struct types)
4.1.3 简单类型(simple types)
4.1.4 整类型(integral types)
4.1.5 浮点数类型(floating point types)
4.1.6 十进制类型(the decimal type)
4.1.7 布尔类型(the bool type)
4.1.8 枚举类型(enumeration types)
4.2 引用类型(reference types)
4.2.1 类类型(class types)
4.2.2 对象类型(the object type)
4.2.3 字符串类型(the string type)
4.2.4 接口类型(interface types)
4.2.5 数组类型(array type)
4.2.6 委托类型(delegate type)
4.3 封箱和非封箱(boxing and unboxing)
4.3.1 封箱转换(boxing conversions)
4.3.2 非封箱转换(unboxing conversions)
第5章 变量
5.1 变量分类(variable categories)
5.1.1 静态变量(static variables)
5.1.2 实例变量(instance variables)
5.1.3 数组成员(array elements)
5.1.4 值参数(value parameters)
5.1.5 引用参数(referendce parameters)
5.1.6 输出参数(output parameters)
5.1.7 局部变量(local variables)
5.2 默认值(default values)
5.3 明确赋值(definite assignment)
5.3.1 初始赋值变量(initially assigned variables)
5.3.2 初始末赋值变量(initially unassigned variables)
5.4 变量引用(variable references)
第6章 转换
6.1 隐式转换(implicit conversions)
6.1.1 一致性转换(identit conversion)
6.1.2 隐式数值转换(implicit numeric conversions)
6.1.3 隐式枚举转换(impliclt enumeration conversiom)
6.1.4 隐式参照转换(implicit reference converions)
6.1.5 封箔转换(boxing conversions)
6.1.6 隐式常量表达式转换(implicit constant expression conversions)
6.1.7 用户自定义隐式转换(user-defined implicit conversions)
6.2 显式转换(explicit conversions)
6.2.1 显式数值转换(explicit numeric conversions)
6.2.2 显式枚举转换(explicit enum conversions)
6.2.3 显式引用转换(explicit reference conversions)
6.2.4 非封箱转换(unboxing convenions)
6.2.5 用户自定义显式转换(user-defined explicit conversions)
6.3 标准转换(standard conversions)
6.3.1 标准隐式转换(standard implicit conversions)
6.3.2 标准显式转换(standard explicit conversions)
6.4 用户自定义转换(user-defined conversions)
6.4.1 被允许的用户自定义转换(permitted user-defined conversions)
6.4.2 用户自定义转换求值(evalustion of user-defined conversions)
6.4.3 用户自定义隐式转换(user-defined implicit conveersions)
6.4.4 用户自定义显式转换(user-defined explicit conversions)
第7章 表达式
7.1 表达式分类(expression classifications)
7.1.1 分类(classifications)
7.1.2 表达式的值(values of expressions)
7.2 操作符(operators)
7.2.1 操作符优先与结合性(operator precedence and associativity)
7.2.2 操作符重载(operator overloading)
7.2.3 一元操作符重载分解(unary operator overload resolution)
7.2.4 二进制操作符重载分解(binary operator overload resolaction)
7.2.5 候选用户自定义操作符(candidate user-defined operators)
7.2.6 数提升(numeric promotions)
7.3 成员查找(member lookup)
7.4 函数成员(function members)
7.4.1 自变量列表(argument lists)
7.4.2 重载分解(overload resolution)
7.4.3 函数成员引用(function member invocation)
7.5 原始表达式(primary expressions)
7.5.1 字母(literals)
7.5.2 简化名(smple manes)
7.5.3 括弧表达式(parenthesized expressions)
7.5.4 成员访问(member access)
7.5.5 引用表达式(invocation expressions)
7.5.6 成员访问(elemet access)
7.5.7 this访问(this access)
7.5.8 基本访问(base access)
7.5.9 后缀增量和减量操作符(postfix increment and decrement operators)
7.5.10 new操作符(new operator)
7.5.11 typeof操作符(type of operator)
7.5.12 检查的和未检查操作符(checked and unchecked operators)
7.6 一元表达式(unary expression)
7.6.1 一元加操作符(unary plus operator)
7.6.2 一元减操作符(unary minus operator)
7.6.3 逻辑非操作符(logical negation operator)
7.6.4 按位求补码操作符(bitwise complement operator)
7.6.5 前缀增量和减量操作符(prefix increment and decrement operators)
7.6.6 cast表达式(cast expressions)
7.7 算术运算符(arithmetic operators)
7.7.1 乘法运算操作符(multiplication operator)
7.7.2 除法运算操作符(division operator)
7.7.3 求余数操作符(rermainder operator)
7.7.4 加法操作符(addition operator)
7.7.5 减法操作符(subtraction operator)
7.8 转换操作符(shift operators)
7.9 关系操作符(relational operators)
7.9.1 整数比较操作符(integer comparison operators)
7.9.2 浮点数比较操作符(floating-point comparison operators)
7.9.3 十进制比较操作符(decimal comparison operators)
7.9.4 布尔等操作符(boolean equality operatprs)
7.9.5 枚举比较操作符(enumeration comparison operators)
7.9.6 引用类型相等操作符(refgence type equality operators)
7.9.7 字符串相等操作符(string equality operators)
7.9.8 委托相等操作符(delegate equality operators)
7.9.9 is操作符(the is operator)
7.9.10 as操作符(the as operator)
7.10 逻辑操作符(logical operators)
7.10.1 整数逻辑操作符(inter logical operators)
7.10.2 枚举逻辑操作符(enumeration logical operators)
7.10.3 布尔逻辑操作符(boolean logical operators)
7.11 附加条件逻辑操作符(conditional logical operators)
7.11.1 布尔条件逻辑操作符(boolean conditional logical operators)
7.11.2 自定义条件逻辑操作符(user-defined conditional logical operators)
7.12 条件操作符(conditinal operator)
7.13 赋值操作符(assignment operators)
7.13.1 简单赋值(simple assignment)
7.13.2 复合赋值(compound assignment)
7.14 表达式(expression)
7.15 常量表达式(constant expressions)
7.16 布尔表达式(boolean expressions)
第8章 语句
8.1 结束点和可到达性(end points and reachability)
8.2 块(blocks)
8.3 空语句(the empty statement)
8.4 标号语句(labeled statements)
8.5 声明语句(declaration statements)
8.5.1 局部变量声明(local variable declarations)
8.5.2 局部常量声明(local constant declarations)
8.6 表达式语句(expression statements)
8.7 选择语句(selection statements)
8.7.1 if语句(the if statement)
8.7.2 swith语句(the switch statement)
8.8 iteration语句(iteration statements)
8.8.1 while语句(the while statement)
8.8.2 do语句(the do statement)
8.8.3 for语句(the for statement)
8.8.4 for each语句(the for each statement)
8.9 jump语句(jump statemeots)
8.9.1 break语句(the break statement)
8.9.2 continue语句(the continue statement)
8.9.3 goto语句(the goto statement)
8.9.4 retum语句(the retum statement)
8.9.5 throw语句(the throw statement)
8.10 try语句(the try statement)
8.11 hecked和unchecked语句(the checked and unchecked statements)
8.12 lock语句(the lock statement)
8.13 using语句(the using statement)
第9章 名字空间
9.1 编译单元(compilation units)
9.2 名字空间声明(namespace declarations)
9.3 使用指令(using directives)
9.3.1 别名指令使用(using alias directives)
9.3.2 名字空间指令使用(using nanespace directives)
9.4 名字空间成员(namespace members)
9.5 类型声明(type declarations)
第10章 类
10.1 类声明(class declaarations)
10.1.1 类修改函数(class modifiers)
10.1.2 类基本说明(class base specification)
10.1.3 类主体(class body)
10.2 类成员(class member)
10.2.1 继承(inheritance)
10.2.2 new修改函数(the new modifier)
10.2.3 访问修改函数(access modifiers)
10.2.4 constituent类型(constituent types)
10.2.5 静态和实例成员(static and instance members)
10.3 常量(cogstants)
10.4 域(fields)
10.4.1 静态和实例域(static and instance fields)
10.4.2 readonly域(readonly fields)
10.4.3 域初始化(field initialization)
10.4.4 变量初始化(variable initilizers)
10.5 方法(methods)
10.5.1 方法参数(method parmeter)
10.5.2 静态和实例方法(static and instance methods)
10.5.3 虚拟方法(virtual methods)
10.5.4 重载方法(override methods)
10.5.5 封装方法(sealed methods)
10.5.6 抽象方法(abstract methods)
10.5.7 外部方法(external methods)
10.5.8 方法主体(method body)
10.5.9 方法重载(method overloading)
10.6 属性(properties)
10.6.1 静态属性(static properties)
10.6.2 访问函数(accessors)
10.6.3 虚拟、封装、重载和抽象访问函数(virtual,sealed,overrde and abstrct accessors)
10.7 事件(events)
10.7.1 事件访问函数(event accessors)
10.7.2 静态事件(static events)
10.8 索引(indexers)
10.9 操作符(operators)
10.9.1 一元操作符(unary operators)
10.9.2 二元操作符(binary operators)
10.9.3 转换操作符(conversion operators)
10.10 实例构造函数(instance constructors)
10.10.1 构造函数初始化(constructor initializers)
10.10.2 实例变量初始化函数(inatace variable initializers)
10.10.3 构造函数执行(constructor execution)
10.10.4 默认构造函数(default constructors)
10.10.5 局部构造函数(private constructors)
10.10.6 可选择的构造函数参数(optional const)
10.11 态构造函数(static constructors)
10.12 析构函数(destructors)
第11章 结构
11.1 结构声明(struct declarations)
11.1.1 结构修改函数(struct modifiers)
11.1.2 结构接口(struct interfaces)
11.1.3 结构主体(struct body)
11.2 结构成员(struct members)
11.3 类和结构差异(class and struct differences)
11.3.1 值语义(value semantics)
11.3.2 继承(inheritance)
11.3.3 赋值(assignment)
11.3.4 默认值(default values)
11.3.5 封箱和非封箱(boxing and unboxing)
11.3.6 this的意思(meaning of this)
11.3.7 域初始化(field initializers)
11.3.8 构造函数(constructors)
11.3.9 析构函数(destructors)
11.4 结构实例(struct examples)
11.4.1 数据库整数类型(database integer type)
11.4.2 布尔型数据库类型(database boolean type)
第12章 数组
12.1 数组类型(array types)
12.2 数组建立(array creation)
12.3 数组成员访问(array element access)
12.4 数组成员(array members)
12.5 数组方差(array covariance)
12.6 数组初始化函数(array initializers)
第13章 接口
13.1 接口声明(interface declarations)
13.1.1 接口修改函数(interface modifiers)
13.1.2 基本接口(base interfaces)
13.1.3 接口主体(interface body)
13.2 接口成员(interface members)
13.2.1 接口方法(interface methods)
13.2.3 接口事件(interface events)
13.2.4 接口索引(interface indexers)
13.2.5 接口成员访问(interface member access)
13.3 全权接口成员名字(fully qualified intenace member names)
13.4 接口执行(interface implementations)
13.4.1 显式接口成员执行(explicit interface member implementations)
13.4.2 接口映射(interface mapping)
13.4.3 接口执行继承(interface implementation inheritance)
13.4.4 接口再执行(interface re-implementation)
13.4.5 抽象类和接口(abstract classes and interfaces)
第14章 枚举
14.1 枚举声明(enum declarations)
14.2 枚举修改函数(enum modifiers)
14.3 枚举成员(enum members)
14.4 enum值和操作(enum values and operations)
第15章 委托
15.1 委托声明(delegate declarations)
15.2 委托实例(delegate instantition)
15.3 多cast委托(multi-cast delegates)
15.4 委托引用(delegate invocation)
第16章 异常
16.1 异常原因(causes of exceptions)
16.2 system.exception类(the system.exception class)
16.3 怎样处理异常(how exceptions are handled)
16.4 常用的异常类(common exception classes)
第17章 属性
17.1 类属性(attribute classes)
17.1.1 attributeusage属性(the attributeusage attribute)
17.1.2 位置和命名参数(positional and named parameters)
17.1.3 属性参数类型(attribute parameter types)
17.2 属性说明(attribute specification)
17.3 属性实例(attribute instances)
17.3.1 属性的编译(compilation of attribute)
17.3.2 属性实例的运行期恢复(run-time retrieval of an attribute instance)
17.4 保留属性(reserved attribute)
17.4.1 attributeusage属性(the attributeusage attribute)
17.4.2 conditional属性(the conditional attribute)
17.4.3 obsolete属性(the obsolete attribute)
附录a 不安全代码
附录b 互操作性
参考文献
在过去的二十多年内,C和C++已经成为在软件开发中应用最广泛的开发语言。但是C和C什的灵活性牺牲了它们的开发效率,如果和其他开发语言相比,相同功能的C/C++软件通常需要更长的开发周期。正是由于C/C++开发的复杂性和需要较长的开发周期,许多C/C++开发人员都在寻找一种可以在功能和开发效率间提供更多平衡的开发语言。作为快速创建和集成XML Web服务和应用程序的单一综合工具,Visual Soudio.NET在改善操作的同时极大地提高了开发效率。其中的Visual C#.NET (C#的发音为C Sharp)是Microsoft推出的新型语言,它可提高C和C++开发人员的效率。Visual C#.NET对具有属性、方法、索引器、特性、版本和事件的组件提供一流的支持,并同时对.NET平台提供强有力的和有效的支持。
C#是一种先进的、面向对象的语言,通过C#可以让开发人员快速建立大范围的基于MS网络平台的应用,并且提供大量的开发工具和服务,帮助开发人员开发基于计算和通信的各种应用。由于C#是一种面向对象的开发语言,所以将C#可以大范围的适用于高层商业应用和底层系统的开发。即使是通过简单的C#构造也可以将各种组件方便地转变为基于Web的应用,并且能够通过Internet被各种系统或其他开发语言所开发的应用调用。
即使抛开上面所提到的优点,C#也可以为C/C++开发人员提供快速的开发手段而不需要牺牲任何C/C++语言的特点/优点。从继承角度来看,C#在更高层次上重新实现了C/C++,熟悉C/C++开发的人员可以很快的转变为C#开发人员。C#的优点包括:
● 高的开发效率与安全性;
● 与Web开发相结合;
● 减小开发中的错误;
● 提供内置的版本支持来减少开发费用;
● 功能强,易于表现,灵活;
● 更好的结合商业应用中的流程与软件实现:
● 可扩展的协作能力;
● 允许有限制的使用指针。
总之,使用C#能够利用方便快捷的Microsoft网络平台建立各种应用和建立能够在网络间相互调用的Web服务。从开发语言的角度来讲,C#可以更好地帮助开发人员避免错误,提高工作效率,并具有C/C++的强大功能。
该书结构合理、内容翔实、循序渐进,适合各个层次的读者学习参考。由于时间仓促,本书编著过程中难免存在错误和纰漏,恳请广大读者批评指正。
评论交流
共有48人开贴评论
65人参与评论
9人参与打分
查看
     |
4人 |
44% |
用户平均打分
|
    |
0人 |
0% |
   |
2人 |
22% |
  |
1人 |
11% |
 |
2人 |
22% |
烂死的书
中午无意中在书店看到
明明就是抄袭specification而且翻译的还很恶心
千万不要买啊
绝对浪费精神资源和纸张
回复
(
2条评论--

)
正在读取本评论的讨论,请稍侯……
晕,我今天听我们老师说这本书还可以,不像你们有些家或都说自己没看开口就垃圾
一看你们的等级就知道也没买过什么书,也就没看过什么书,跟到别人后面打哇哇
回复
(
2条评论--

)
正在读取本评论的讨论,请稍侯……
看名字不要太牛X哦。。。真好意思起这个名字。。。实在只能给这个评价。。。不说书,光这个态度。。。

加载中...