xiaxia

2010年1月12日 #

名词解释

摘要: 什么是公共类型系统 (CTS)?公共类型系统是多信息类型系统,它被内置在公共语言运行时中,支持大多数编程语言中的类型和操作。公共类型系统支持大量编程语言的完全实现。什么是公共语言规范 (CLS)?公共语言规范是一组结构和限制,用作库编写者和编译器编写者的指南。它使任何支持 CLS 的语言都可以完全使用库,并且使这些语言可以相互集成。公共语言规范是公共类型系统的子集。对于那些需要编写代码供其他开发人... 阅读全文

posted @ 2010-01-12 21:31 Array 阅读(236) 评论(0) 推荐(0) 编辑

2007年9月29日 #

为泛型列表创建迭代器

摘要: 在本示例中,泛型类Stack实现泛型接口 IEnumerator。声明了一个类型 T 的数组,并使用 Push 方法给数组赋值。在 GetEnumerator 方法中,使用 yield return 语句返回数组的值。 还实现非泛型 GetEnumerator,因为 IEnumerable 继承自 IEnumerable。此示例显示了典型的实现,在该实现中,非泛型方法直接将调用转给泛型方法。 ... 阅读全文

posted @ 2007-09-29 09:40 Array 阅读(173) 评论(0) 推荐(0) 编辑

使用迭代器

摘要: 创建迭代器最常用的方法是对 IEnumerable 接口实现 GetEnumerator 方法,例如: public System.Collections.IEnumerator GetEnumerator() { for (int i = 0; i < max; i++) { yield return i; } } GetEnumerator 方法的存在... 阅读全文

posted @ 2007-09-29 09:33 Array 阅读(196) 评论(0) 推荐(0) 编辑

.NET代码编写规范

摘要: 下面是根据FxCop整理的.NET代码编写规范,仅供参考。一、 Design(设计)1. Abstract types should not have constructors 抽象类不应该声明构造方法2. Assemblies should have valid strong names 程序集应该具有强名称3. Avoid empty interfaces 避免使用空的接口4. Avoid e... 阅读全文

posted @ 2007-09-29 09:18 Array 阅读(229) 评论(0) 推荐(0) 编辑

yield迭代器

摘要: // 版权所有 (C) Microsoft Corporation。保留所有权利。 using System; using System.Collections.Generic; using System.Text; namespace Yield { class Yield { public static class NumberList { ... 阅读全文

posted @ 2007-09-29 09:02 Array 阅读(135) 评论(0) 推荐(0) 编辑

泛型實例-1

摘要: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebContr... 阅读全文

posted @ 2007-09-29 09:00 Array 阅读(201) 评论(0) 推荐(0) 编辑

2007年7月31日 #

在ASP.NET页面里执行存储过程

摘要: SqlCommand myCommand=new SqlCommand(); myCommand.Connection=new SqlConnection(strCon); myCommand.Connection.Open(); myCommand.CommandText = "sp_DeletePolicy" ;//存储过程名 myCom... 阅读全文

posted @ 2007-07-31 11:04 Array 阅读(288) 评论(0) 推荐(0) 编辑

2006年9月1日 #

对以上的补充

摘要: #!d:\Python24\python.exe#Fig.6.3:fig06_03.py#DisplaysthecurrentdateandtimeinaWebbrowser.importtimedefprintHeader(title,mail,name):print"""Content-type:text/html<?xmlversion="1.0"encoding="UTF-8"?&g... 阅读全文

posted @ 2006-09-01 11:07 Array 阅读(133) 评论(0) 推荐(0) 编辑

第一个python程序

摘要: 最近在玩pytho(呵呵.NET好久没用啦),好啦,先看看这段程序吧:1.#!d:\Python24\python.exe2.#Fig.6.3:fig06_03.py3.#DisplaysthecurrentdateandtimeinaWebbrowser.4.5.importtime6.7.defprintHeader(title):8.print"""Content-type:text/htm... 阅读全文

posted @ 2006-09-01 10:24 Array 阅读(252) 评论(0) 推荐(0) 编辑

2006年8月17日 #

2006/8/17

摘要: 博客开通了半年了,一直没有时间写些什么!时间在每天的琐事中过去. 阅读全文

posted @ 2006-08-17 11:42 Array 阅读(128) 评论(0) 推荐(0) 编辑

导航