摘要:
原课文 Aeroplanes are slowly driving me mad. I live near an airport and passing planes can be heard night and day. The airport was built years ago, but for some reason it could not be used then. Last ye... 阅读全文
摘要:
类型转换CLR最重要的特性之一是安全性,在运行时,通过调用GetType(),总是知道一个对象的确切类型。CLR允许将一个对象转换为它的实际类型或者它的任何基类型。Eg: C#可直接将一个对象转换为它的任何基类,因为向基类转换被认为是一种安全的隐式转换。但是将对象向它的某个派生类转换时,C#要求必须显示转换,因为这种转换可能在运行时报错。类型伪装是去多安全漏洞的根源。在C#中还有is和as两种转换方式:is转换:is检查一个类型是否兼容于指定的类型,并返回一个Boolean值。(is操作符永远不会抛出异常,只会返回ture or false) 1: Object o = new Obje... 阅读全文
摘要:
课文: Fishing is my favourite sport. I often fish for hours without catching anything. But this does not worry me. Some fishermen are unlucky. Instead of catching fish, they catch old boots and rubbish... 阅读全文
摘要:
本章内容要点所有类型都从System.Object派生类型转换命名空间和程序集运行时的相互联系所有类型都从System.Object派生“运行时”要求每个类型最终都要从System.Object类型派生。由于所有类型最终都从System.Object派生,所以可以保证每个类型的每个对象都有一组最基本的方法,具体如下:此外,从System.Object派生的类型能访问受保护的方法,如下图CLR要求所有对象都用new操作符来创建,Eg. NameClass isaac = new NameClass();以下为new所做的事情:计算所有需要的字节数从托管堆中分配指定类型需要的字节数,从而分配对象的 阅读全文
摘要:
My aunt Jennifer is an actress. She must be at least thirty-five years old. In spite of this, she often appears on the stage as a young girl. Jennifer will have to take part in a new play soon. This t... 阅读全文
摘要:
What was the polite request? If you park your car in the wrong place, a traffic policeman will soon find it. You will be very lucky if he lets you go without a ticket. However, this ... 阅读全文
摘要:
CLR支持两种程序集:弱命名程序集(weakly named assembly)和强命名程序集(strongly named assembly).由于弱类型程序集总是私有部署的,所以当CLR在应用程序的基目录或者子目录中搜索程序集的文件时,只会使用程序集的名称(添加一个.dll或者.exe)。强类型程序集则是由一个文件名、一个版本号和一个语言文化(culture),除此之外,强命名程序集还使用发布者的私钥进行了签名。创建强类型步骤:使用Strong Name实用程序(SN.exe)来获取一个密钥。(这个程序与.NET Framework SDK和MS VS配套提供的。)Eg. SN –k My 阅读全文
摘要:
课文链接:http://www.ebigear.com/res-27-7777700000358.html 笔记链接:http://bbs.ebigear.com/space-uid-3256188.html 课文: I was having dinner at a restaurant when Tony Steele came in. Tony worked in a la... 阅读全文
摘要:
课文链接:http://www.ebigear.com/res-27-7777700000362.html 笔记链接:http://bbs.ebigear.com/space-uid-3256188.html 课文: The secretary told me that Mr. Harmsworth would see me. I felt very nervous when I went into his office. He did not look up from his desk when I entered. After I had sat down, he s... 阅读全文
摘要:
今天加班回来晚了,由于明天周末还要去加班给客户部署系统,所以今天就只要学个英语了,明天争取把C#补上。课文链接:http://www.ebigear.com/res-1393-7777700044607.html 笔记链接:http://bbs.ebigear.com/space-uid-3256188.html 课文: The Greenwood Boys are a group of pop singers. At present, they are visiting all parts of the country. They will be arriving here to... 阅读全文