委托的Invoke方法用来进行同步调用。同步调用也可以叫阻塞调用,它将阻塞当前线程,然后执行调用,调用完毕后再继续向下进行。同步调用的例子:using System;using System.Threading;public delegate int AddHandler(int a, int b)...
问题:将dotnet framework 4.0 切换到2.0时,编译没有问题,在运行时出现如下错误:System.InvalidCastException: 无法将类型为“System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.Component...
uses System.TypInfo; // Sync with compiler internals TTypeKind = (tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, tkClass, tkMe...
分类:
其他好文 时间:
2015-03-28 11:30:47
阅读次数:
121
父类:public class Parent { public String name; private String pass; public void say1(AA aa){ System.out.println("parent say1...
分类:
编程语言 时间:
2015-03-28 11:30:00
阅读次数:
166
不知道问题愿意,重新写新画面一点一点粘贴,发现是提交后弹提示框导致,发现机盘封装输出JS用的System.Web.HttpContext.Current.Response.Write改成Page.ClientScript.RegisterClientScriptBlock或者Page.ClientS...
分类:
Web程序 时间:
2015-03-28 11:19:44
阅读次数:
149
在.NET4.0中,我可以借助System.Speech组件让电脑来识别我们的声音。 以上,当我说"name",显示"Darren",我说"age",显示"永远21"。如何做呢? 首先要开启电脑的语音识别功能。 右键电脑右下方的扬声器,选择"录音设备"。 点击默认的"麦克风",再点击左下角的"配置"...
Because of the huge population of China, public transportation is very important. Bus is an important transportation method in traditional public transportation system. And it’s still playing an important role even now.
The bus system of City X is quite st...
分类:
编程语言 时间:
2015-03-28 10:09:31
阅读次数:
201
一,字符串连接运算符(“+”)
字符串连接运算符的作用是将两个字符串连接在一起,组成一个新的字符串。在程序中出现(“提示字符”+变量),这里起字符连接作用。
用一个例子来说明字符串连接运算符的作用:
using System;
using System.Collections.Generic;
using System.Linq;
using System.T...
[原文链接] 在日常编程过程中,我们可能经常需要Copy各种数组,一般来说有以下几种常见的方法:Array.Copy,IList.Copy,BinaryReader.ReadBytes,Buffer.BlockCopy,以及System.Buffer.memcpyimpl,由于最后一种需要使用指针,...
分类:
编程语言 时间:
2015-03-28 08:41:49
阅读次数:
252
当需要输入一个几位数字时,对位数进行判断。可用下面代码实现:Scanner scan=new Scanner(System.in);i=scan.nextLong();String s = String.valueOf(i); 强制转换成字符型,用s.length()得到字符串长度来判断是否输入的是...
分类:
编程语言 时间:
2015-03-28 07:37:29
阅读次数:
182