zwei1121

博客园 首页 新随笔 联系 订阅 管理

List<string> TelList;

 for (int i = 1; i < TelList.Count; i++)
            {
                string prefix = "Num";
                if (i < 10)
                {
                    string tel = TelList[i].ToString();
                    model.GetType().InvokeMember(prefix + (i + 1).ToString(), System.Reflection.BindingFlags.SetProperty, null, model, new Object[] { tel });
                }
            }

posted on 2008-08-29 09:44  zwei  阅读(187)  评论(0编辑  收藏  举报