摘要:
OpenFileDialog OFD = new OpenFileDialog(); OFD.Title = "打开第一个文本文件"; OFD.FileName = "*.txt"; OFD.InitialDirectory = WorkSpacePath; if (OFD.ShowDialog() == DialogResult.OK) { FileInfo fi = new FileInfo(OFD.FileName); ... 阅读全文
摘要:
OpenFileDialog OFD = new OpenFileDialog(); OFD.Title = "打开第一个文本文件"; OFD.FileName = "*.txt"; OFD.InitialDirectory = WorkSpacePath; if (OFD.ShowDialog() == DialogResult.OK) { FileInfo fi = new FileInfo(OFD.FileName); ... 阅读全文
摘要:
采用文件流方式来处理,StreamReader,StreamWriter:StreamReader sr = new StreamReader("c:\\a.txt"); while(!sr.EndOfStream) //读到文件流结尾退出 { string temp = sr.ReadLine(); // 一行一行的读 } sr.Close(); StreamWriter sw = new StreamWriter("c:\\a... 阅读全文
摘要:
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(); ... 阅读全文
摘要:
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... 阅读全文
摘要:
哈希表是通过哈希值来访问的,通过一定的内存浪费获取检索速度,在检索项时是不需要逐一检索。在编程中有一定的好处。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... 阅读全文
|