private void button1_Click(object sender, EventArgs e) { string path = @"C:\Users\PSY\Desktop\test.xml"; MyXml myxml = new MyXml(); myxml.CreateXmlTree(path); MessageBox.Show("Test"); }