Beispiel #1
0
        static public string getPropertyValueByName(Item it, string name, string defaultValue)
        {
            IEnumerator list = it.GetEnumerator();

            while (list.MoveNext())
            {
                Property prop = (Property)list.Current;
                if (prop.name.Equals(name))
                {
                    return(prop.value);
                }
            }

            return(defaultValue);
        }
Beispiel #2
0
        static public void print(Item it)
        {
            Console.Write("\t\t<Item");
            Console.Write(" name=" + it.name);
            Console.Write(" type=" + it.type);
            Console.Write(" note=" + it.note);
            Console.WriteLine(">");

            IEnumerator list = it.GetEnumerator();

            while (list.MoveNext())
            {
                print((Property)list.Current);
            }

            Console.WriteLine("\t\t<\\Item>");
        }