业精于勤

导航

11 2011 档案

线程安全 二
摘要:usingSystem;usingSystem.Threading;abstractclassCounter{protectedintcount=0;publicabstractintRead(intthreadNum);publicabstractvoidIncrement(intthreadNum);}//NotethattheinstancevariablecountissharedbetweenthetwomethodsRead//andIncrement.Threadsconcurrentlyexecutingoneorbothofthesemethodscan//interfere 阅读全文

posted @ 2011-11-15 11:41 言午 阅读(198) 评论(0) 推荐(0)

线程安全 一
摘要:usingSystem;usingSystem.Threading;usingSystem.Runtime.Remoting.Contexts;usingSystem.Runtime.CompilerServices;//NotethattheinstancevariablecountissharedbetweenthetwomethodsRead//andIncrement.Threadsconcurrentlyexecutingoneorbothofthesemethodscan//interferewitheachotherunlessactionistakentosynchronize 阅读全文

posted @ 2011-11-15 11:40 言午 阅读(213) 评论(0) 推荐(0)

第十周作业
摘要:写一个电话本应用程序,参考你手机的电话本,具体要求如下:1 定义一个类,描述电话本里的联系人信息.2 使用泛型集合类,存储电话本内容3 模拟实现增删改(改,就是查到后,更新)3 使用linq 查询或排序,如:电话本可按类型分组(朋友\家人\同事等) 按姓/名排序,按新旧等可在winform console完成注意要有示例数据 阅读全文

posted @ 2011-11-03 15:16 言午 阅读(168) 评论(0) 推荐(0)

lanmada表达式--神马叫优雅
摘要:看看,委托,原来的用法usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceConsoleApp{delegatestringDeleTest(stringname);classProgram{staticvoidMain(string[]args){DeleTestt=newDeleTest(SomeMethod);Console.WriteLine(t("tom"));}staticstringSomeMethod(stringstr){return& 阅读全文

posted @ 2011-11-01 08:44 言午 阅读(676) 评论(0) 推荐(0)