03 2012 档案

摘要:public class Clock { private object obj = new object(); public void RunClock(int Minute) { Thread thread1 = new Thread(() => { int sencond = Minute * 60 / 2; while (sencond > 0) { Di(true)... 阅读全文
posted @ 2012-03-22 14:15 Shikyoh 阅读(1335) 评论(0) 推荐(0)
摘要:编码规范一 命名空间 <公司名称>.(<产品名称>|<相关技术>)[.<用途>][.<子命名空间>]二 代码风格花括号“{}”不允许省略,即使只有一段代码。不允许省略访问修饰符。类型默认是密封的。不允许公开字段。使用括号“()”来强调运算符优先级。三 命名规范(一) 类、结构和接口的命名使用名词或名词短语。使用Pascal方式。在接口名称前加上前缀“I”。考虑在派生类末尾使用基类的名字。如果该类仅仅为了实现某个接口,那么请保持其与接口命名的统一。如果从.NET 框架中存在的类型派生的类型,应该遵循以下规范:基类派生类System.At 阅读全文
posted @ 2012-03-22 13:29 Shikyoh 阅读(385) 评论(0) 推荐(0)
摘要:最近没什么事情,复习了下以前几块不熟悉的东西。IEnumerator接口,yield,operatornamespace test{ class Program { static void Main(string[] args) { Console.WriteLine("泛型方法数组遍历"); string[] strList = new string[] { "1", "2", "3", "4", "5" }; ListHelper<string> helper 阅读全文
posted @ 2012-03-16 15:18 Shikyoh 阅读(269) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.Serialization.Formatters.Binary;using System.IO;namespace TestBinaryFormatter{ class Program { static void Main(string[] args) { //序列化 从内存读取信息流 Book book =... 阅读全文
posted @ 2012-03-16 12:09 Shikyoh 阅读(2584) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Runtime.Serialization.Formatters.Binary;namespace CloneClass{ class Program { static void Main(string[] args) { Results set1 = new Results(); Resul... 阅读全文
posted @ 2012-03-16 11:45 Shikyoh 阅读(618) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace LearnDelegate{ class Program { public static void Main(string[] args) { SyncDel del = Calulate; int x = 10; int y = 10; d... 阅读全文
posted @ 2012-03-15 11:05 Shikyoh 阅读(432) 评论(0) 推荐(0)
摘要:select [表名]=c.Name, [表说明]=isnull(f.[value],''), [列名]=a.Name, [列序号]=a.Column_id, [标识]=case when is_identity=1 then '是' else '' end, [主键]=case when exists(select 1 from sys.objects x join sys.indexes y on x.Type=N'PK' and x.Name=y.Name join sysin... 阅读全文
posted @ 2012-03-14 14:33 Shikyoh 阅读(358) 评论(0) 推荐(0)