----赖格英-----

记忆不好了,记录工作中的点点滴滴....

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2014年1月12日

摘要: OpenFileDialog OFD = new OpenFileDialog(); OFD.Title = "打开第一个文本文件"; OFD.FileName = "*.txt"; OFD.InitialDirectory = WorkSpacePath; if (OFD.ShowDialog() == DialogResult.OK) { FileInfo fi = new FileInfo(OFD.FileName); ... 阅读全文
posted @ 2014-01-12 20:37 向北方 阅读(12393) 评论(0) 推荐(0) 编辑

摘要: 采用文件流方式来处理,StreamReader,StreamWriter:StreamReader sr = new StreamReader("c:\\a.txt"); while(!sr.EndOfStream) //读到文件流结尾退出 { string temp = sr.ReadLine(); // 一行一行的读 } sr.Close(); StreamWriter sw = new StreamWriter("c:\\a... 阅读全文
posted @ 2014-01-12 20:31 向北方 阅读(453) 评论(0) 推荐(0) 编辑

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication1{ public partial class Form1 : Form { public Form1() { InitializeComponent(); ... 阅读全文
posted @ 2014-01-12 20:26 向北方 阅读(424) 评论(0) 推荐(0) 编辑

摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure Button1Click... 阅读全文
posted @ 2014-01-12 10:23 向北方 阅读(774) 评论(0) 推荐(0) 编辑

摘要: 哈希表是通过哈希值来访问的,通过一定的内存浪费获取检索速度,在检索项时是不需要逐一检索。在编程中有一定的好处。unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedur... 阅读全文
posted @ 2014-01-12 10:18 向北方 阅读(2911) 评论(0) 推荐(0) 编辑