开发者

VB.NET Remove First line

This is my code i tried but it removes 2 lines not one

开发者_开发技巧
    Dim b As String() = Split(TextBox1.Text, vbNewLine)
    TextBox1.Text = String.Join(vbNewLine, b, 1, b.Length - 1)


b.Length - 1 cause the last element to be removed while joining.

To remove the first line, the start index should be 2.

Try: TextBox1.Text = String.Join(vbNewLine, b, 2, b.Length)


You have a problem in another part of your program, see this shot of the debugger:

VB.NET Remove First line

maybe you call the routine twice? with timers, take care

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜