日期:2014-05-16 浏览次数:20880 次
Quote: 引用: Quote: 引用: string newadd = addr.Insert(19, "\n"); MessageBox.Show(newadd); 这样只会插入19,如果38就不会插入了 int count = addr.Length / 19; for (int i = 1; i <= count; i++) { string newadd = addr.Insert(19*i+i-1, "\n"); addr = newadd; } MessageBox.Show(addr);
Quote: 引用: string newadd = addr.Insert(19, "\n"); MessageBox.Show(newadd); 这样只会插入19,如果38就不会插入了
string newadd = addr.Insert(19, "\n"); MessageBox.Show(newadd);
int count = addr.Length / 19; for (int i = 1; i <= count; i++) { string newadd = addr.Insert(19*i+i-1, "\n"); addr = newadd; } MessageBox.Show(addr);