Hello world.

    public class refInfo
    {
        public int ID { getset; }
        public string Name { getset; }
        public int Sex { getset; }
        public string Adress { getset; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            System.Reflection.PropertyInfo[] infos = this.GetType().GetProperties();
            foreach (var x in infos)
            {
                sb.Append(string.Format("{0}:{1};", x.Name, x.GetValue(thisnull)));
            }
            return sb.ToString();
        }
    }
posted on 2012-06-29 10:54  Ryan.zhu  阅读(149)  评论(0编辑  收藏  举报
come soon on