Hi i have been making a small login suite purely out of fun. i am using xml to record the passwords set by a user, i have coded most of it but i am baffeled by this error!
here is my work so far;

private void al(String password, string name)
            XmlDocument myxml = new XmlDocument();
            XmlElement el = myxml.CreateElement("value");
            el.SetAttribute("password", password);
            el.InnerText = name;

            if (!File.Exists(pswXml))
                XmlElement root = myxml.CreateElement("value");




            if (panel1.Visible == true)
                TreeNode node = new TreeNode();
                node.Name = el.GetAttribute("password");
                node.ToolTipText = el.GetAttribute("password");

        private void button1_Click(object sender,EventArgs e)

here are the imports i used

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Collections;
using System.IO;
using System.Xml;
using System.Net;
using System.Diagnostics;
using System.Globalization;

also i declared these in the public part if this matters.

public static String pswXml = "psw.xml";
List<String> urls = new List<String>();
        XmlDocument settings = new XmlDocument();

and i get this error message for this part of the code

private void button1_Click(object sender,EventArgs e)
Error	1	No overload for method 'al' takes '0' arguments

Any help is much appreciated thanks!

The al() method requires 2 strings as parameters. Call it like this;

al("password", "name");

And it will work.

commented: easy peasy :) +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.