C#.NET Show Text Info

        public void ShowTxtInfo(ListView lv,ref TextBox txt)
        {
            txt.Text = "";
            string tmpstr = string.Empty;
            for (int i = 0; i < lv.Columns.Count; i++)
            {
                //tmpstr = tmpstr + "\t" + lv.SelectedItems[0].SubItems[i].Text;
                tmpstr = tmpstr + "  " + lv.SelectedItems[0].SubItems[i].Text;
            }
            txt.Text = tmpstr;
        }

 

客户端代码: CCMRule.ShowTxtInfo(lvSAPDetail, ref txtInfo);

你可能感兴趣的:(.net)