随笔分类 -  C#基础

11-C#反射机制
摘要:C#反射机制转自:http://blog.csdn.net/educast/article/details/2894892反射的用途: (1)使用Assembly定义和加载程序集,加载在程序集清单中列出模块,以及从此程序集中查找类型并创建该类型的实例。 (2)使用Module了解包含模块的程序集以及... 阅读全文

posted @ 2015-07-08 09:44 zy` 阅读(91) 评论(0) 推荐(0) 编辑

10-利用com组件读取office
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Text.RegularExpressions;using iTextShar... 阅读全文

posted @ 2015-03-11 10:47 zy` 阅读(670) 评论(0) 推荐(0) 编辑

09-删除目录及文件操作
摘要:文件操作基础知识:Directory//操作目录(文件夹),静态类。DirectoryInfo//文件夹的一个“类”,实例类。用来描述一个文件夹对象(获取指定目录下的所有目录时返回一个DirectoryInfo数组。返回文件夹数组)FileInfo//文件类,实例类。用来描述一个文件对象。获取指定目... 阅读全文

posted @ 2015-03-05 11:08 zy` 阅读(263) 评论(0) 推荐(0) 编辑

08-在字符串中统计子串出现的次数
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;namespace _05在字符串中统计子串出现的次数{ ... 阅读全文

posted @ 2015-03-05 10:14 zy` 阅读(443) 评论(0) 推荐(0) 编辑

07-控制台程序实现关闭进程
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Diagnostics;namespace KillProces... 阅读全文

posted @ 2015-02-27 14:28 zy` 阅读(565) 评论(0) 推荐(0) 编辑

06-自定义Attribute标记案例
摘要:自定义Attribute:1)Attribute都从System. Attribute类继承,类名一般以Attribute结尾2) 标记类的用途—AttributeUsage标记(标记的标记):AttributeTargets:可以添加到哪些成员上。 AllowMultiple:是否允许在一个成员上... 阅读全文

posted @ 2015-02-13 16:00 zy` 阅读(850) 评论(2) 推荐(0) 编辑

05-XML遍历递归显示到TreeView上(XDocument类)
摘要:1、XML文件(x1.xml): 张三 18 Male 李四 19 Female 杨廉壬 20 ... 阅读全文

posted @ 2015-02-13 14:19 zy` 阅读(349) 评论(0) 推荐(0) 编辑

03-StreamReader和StreamWriter的案例
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace _06职工工资文件翻倍练习{ class Program { ... 阅读全文

posted @ 2015-01-29 14:12 zy` 阅读(201) 评论(0) 推荐(0) 编辑

02-大文件Copy(FileStream文件流类)
摘要:static void Main(string[] args){ string source = @"e:\1.exe";//要移动文件的路径 大文件 string target = @"f:\1.exe";//将文件移动到的目标路径 CopyFile(source, target... 阅读全文

posted @ 2015-01-29 14:05 zy` 阅读(641) 评论(0) 推荐(0) 编辑

01-资料管理器(Directory/DirectoryInfo操作文件夹类)
摘要:public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object... 阅读全文

posted @ 2015-01-29 13:50 zy` 阅读(226) 评论(0) 推荐(0) 编辑

04-我对委托的初步认识
摘要:1、最基本的委托,就是一个可以存储方法的类型案例:把一个方法赋值给一个委托类型的变量 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespac... 阅读全文

posted @ 2013-08-24 18:02 zy` 阅读(136) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示