All pastes #740759 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-10-18 06:13 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace SkunkPreLoader
{
    static class iXML
    {
        static public string version = "";
        static private XmlTextReader reader = new XmlTextReader(@".\Information.xml");

        static public bool GetElement(string elementName, string attributeName)
        {
            while (reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == elementName)
                {
                       version = reader.Value.ToString();
                       return true;
                }
            }
            return false;
        }
    }
}