摘要:
readonly关键字与const关键字不同。const字段只能在该字段的声明中初始化。readonly字段可以在声明或构造函数中初始化。因此,根据所使用的构造函数,readonly字段可能具有不同的值。另外,const字段为编译时常数,而readonly字段可用于运行时常数,如下例所示: public class ReadOnlyTest { class SampleClass { public int x; // Initialize a readonly field public readonly ... 阅读全文
摘要:
HTML DOM 定义了访问和操作 HTML 文档的标准方法。(Document Object Model,DOM)http://www.w3school.com.cn/htmldom/index.asphttp://www.w3.org/DOM/The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style o 阅读全文
摘要:
http://www.cnblogs.com/hyddd/archive/2009/07/20/1526777.html一.什么是Attribute先看下面的三段代码:1.自定义Attribute类:VersionAttribute [AttributeUsage(AttributeTargets.Class)] public class VersionAttribute : Attribute { public string Name { get; set; } public string Date { get; set; } pu... 阅读全文