C#treeview读取xml文件找不到函数
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.Xml;
using System.Collections;
using System.IO;
namespace TreeLoadXml
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
XmlDocument doc = new XmlDocument();
StringBuilder sb = new StringBuilder();
//XML每行的内容
private string xmlLine = "";
//加载
private void Form1_Load(object sender, EventArgs e)
{
doc.Load("TreeXml.xml"); //我是把xml放到debug里面了.你的路径就随便啦.不过这样方便一些.
RecursionTreeControl(doc.DocumentElement, treeView1.Nodes);//将加载完成的XML文件显示在TreeView控件中
这是我看别人的程序,运行没问题,我自己找着编,一摸一样,但是显示最后一行的RecursionTreeControl这个函数没有,硬打进去,就显示上下午找不到,求大神指教