Exemplo n.º 1
0
        static void PrintTingInfo(MimanTing pTing)
        {
            foreach(PropertyInfo p in pTing.GetType().GetProperties())
            {
                foreach(Attribute a in p.GetCustomAttributes(true))
                {
                    if(a.Match(EDITABLE_IN_EDITOR) || a.Match(SHOW_IN_EDITOR))
                    {
                        object o = p.GetValue(pTing, null);

                        string line = "";
                        if(o == null) line = "null";
                        else if(o is string) line = "\"" + o.ToString() + "\"";
                        else line = o.ToString();

                        Console.WriteLine(p.Name + ": " + line);
                    }
                }
            }
        }