摘要:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics; namespace Ex224
{ public partial class Form1 : Form { public Form1() ...
阅读全文
摘要:StringBuilder sb = new StringBuilder();//标题 sb.Append("MAC地址,生产商,报备厂商,终端类型,硬件版本,软件版本kernel,软件版本APP,上线IP,开机时间\n");//内容 for (int i = 0; i < itemCount; i++) { sb.Append(((Label)rptList.Items[i].FindControl("lblMac")).Text + ","); ...
阅读全文
摘要:早上看到老赵写的这个性能计数器,感觉很实用,不过老赵用了很多.C# 3.0 的新语法,还用了 VISTA 和 Server 2008 下特有的Win32 API,对于还在用C#2.0 或者还工作在 XP 或者 Server 2003 下的兄弟们,只能望代码心叹了。应老赵的要求,我修改了他的代码,增加了对低版本C# 和 低版本windows 操作系统的支持。 老赵的原文: 一个简单的性能计数器:CodeTimer 修改说明 1. 采用 接口 取代了原代码中的 Lambda 表达式 2. 采用 GetThreadTimes 这个API 函数替代了原代码中的 QueryThreadCycleTime
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Reflection;namespace WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() ...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Reflection;namespace WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() ...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Reflection;namespace 反射{ class Program { static void Main(string[] args) { ReflectionTest test=new ReflectionTest(); test.ClassMemberInfo(); ...
阅读全文
摘要:.NET反射的定义:审查元数据并收集关于它的类型信息的能力。元数据是一种二进制信息,用以对存储在公共语言运行库可移植可执行文件 (PE) 文件或存储在内存中的程序进行描述。将您的代码编译为 PE 文件时,便会将元数据插入到该文件的一部分中。而将代码转换为 Microsoft 中间语言 (MSIL) 并将其插入到该文件的另一部分中。在模块或程序集中定义和引用的每个类型和成员都将在元数据中进行说明。当执行代码时,运行库将元数据加载到内存中,并引用它来发现有关代码的类、成员、继承等信息。元数据以非特定语言的方式描述在代码中定义的每一类型和成员。元数据存储以下信息:程序集的说明:1. 标识(名称、版本
阅读全文