我将从我的 xml 文件中读取 numericUpDown1.Value 但它不起作用。
我用numericUpDown1.Value = reader.Value;这个给出了一个错误
怎么了?
                XmlTextReader reader = new XmlTextReader("Config.xml");
                XmlNodeType type;
                while (reader.Read())
                {
                    type = reader.NodeType;
                    if (type == XmlNodeType.Element)
                    {
                        if (reader.Name == "WindowsHost")
                        {
                            reader.Read();
                            textBox1.Text = reader.Value;
                        }
                    }
                    if (type == XmlNodeType.Element)
                    {
                        if (reader.Name == "WindowsPort")
                        {
                            reader.Read();
                            numericUpDown1.Value = reader.Value; //Error
                        }
                    }
                }
                reader.Close();