一聚教程网:一个值得你收藏的教程网站

热门教程

遍历所有当前及下级目录,并记录为XML文件

时间:2022-07-02 11:43:18 编辑:袖梨 来源:一聚教程网

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Xml;
namespace WindowsApplication2
{
///
/// Form1 的摘要说明。
///

public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
///
/// 必需的设计器变量。
///

private System.ComponentModel.Container components = null;
const string mypath=@"D: ba2004";
XmlDocument doc=new XmlDocument();
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
///
/// 清理所有正在使用的资源。
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
///
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
///

private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//

热门栏目