.NET框架学习总结(二)

1)面向对象编程:一种使用对象的编程技术。对象自身包含数据结构,属性方法和事件。Events提供对象间的通信。

2)static:声明一个成员不属于单独的对象,属于class本身。

3)封装:信息隐藏机制,从而令代码更加容易维护和理解

4)internal:访问控制关键字,同一程序集可以访问。

5)struct:值类型,不可以继承。

6)C#不支持多继承,但是可以继承多个接口

7)is关键字用于转换是否允许。

if(o is Rectangle){
Rectangle r=(Rectangle) o;
}
8)as 关键字:如若转换失败设为Null

Rectangle r=o as Rectangle;
if(r!=null){
}

9)class 必须继承接口IComparable,实现compareTo方法才能比较实例

10)面向对象编程的三大特性是:封装,继承,多态

11)C#程序中,变量、约束、方法返回值的数据类型必须在compile time已知。

12)System.Collections是ArrayList的泛型类。

13)delegate通常引用一个方法。

public delegate void myDelegate(para1,para2);//被监听

void method(){}

myDelegate handler;
handler+=method;//method将被激活

example2:
class Rectangle{
public event EventHandler changed;
public double Len{
get {
}
set{
len = value;
changed(this,EventArs.Empty)
}
}
}


class test{
main(){
Rectangle rec=new Rectangle();
rec.changed+=new EventHandler(reponse);
}
public response(){}
}

14)Application settings 用来存储应用软件的特殊数据。我们可以在程序运行时修改这个数据。XML。不加密

15)App.config 为XML文件,可以在程序运行时用来改变应用的行为

16)CIL :高级编译语言和机器语言的中间语言。

17)CLI :执行代码和运行环境的规范。

18)CLS:定义了编译语言特性的规则

19)CTS:定义了声明使用和管理数据类型与操作的规则

20)metadata:展示了程序结构的信息,CLI在程序运行状态下使用这些信息来定位和加载类。

21)shared assemblies are signed with a strong name and deployed to the global assembly catche

22)the strong name tool program can be used to generate keys needed to create  a strong name for an assebly.

23)the manifest of an assembly contains info such as version and identity of an assembly.

24)gacutil.exe /i .dll   :the public key has been stored in manifest,to place your assembly to GAC

25)FIle and Fileinfo:提供方法与硬盘交互。StreamReader->text;BinaryReader->image/video----

26)when you done using these objects in your code,you should call the DIspose method so that unmanaged resources can be disposed.

27)XML schema decribes the structure of XML doc.Any XML files conforms to syntactical rules is considered to be well formed.when conformed to to predefined schema, to be valid.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值