摘要:
as 将对象转换某类型,如果失败则返回null。is用来判断对象是否为某个类型,在判断过程中会对对象进行两次转换,而as只有一次转换,故as效率高。
阅读全文
posted @ 2015-11-04 13:40
jinweijie0527
阅读(312)
推荐(0)
摘要:
/** 由SharpDevelop创建。* 用户: jinweijie* 日期: 2015/10/28* 时间: 15:25** 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件*/usingSystem;namespaceInterface{interfaceIStorable{void...
阅读全文
posted @ 2015-10-28 16:54
jinweijie0527
阅读(134)
推荐(0)
摘要:
/** 由SharpDevelop创建。* 用户: jinweijie* 日期: 2015/10/28* 时间: 15:25** 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件*/usingSystem;namespaceInterface{interfaceIStorable{void...
阅读全文
posted @ 2015-10-28 16:45
jinweijie0527
阅读(153)
推荐(0)
摘要:
/** 由SharpDevelop创建。* 用户: jinweijie* 日期: 2015/10/28* 时间: 9:15** 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件*/usingSystem;namespaceStudy{classFraction{intfirst;intse...
阅读全文
posted @ 2015-10-28 10:00
jinweijie0527
阅读(143)
推荐(0)
摘要:
using System;using System.Collections.Generic;public class MyClass{ class A { int a; internal protected class B { public void Display() { A ...
阅读全文
posted @ 2015-10-28 09:03
jinweijie0527
阅读(120)
推荐(0)