如何删除多行文本框c#行中的字符串

问题描述 投票:0回答:1

我在表单的多行文本框中显示了以下数据

enter image description here

我想要从该行中删除“-”,我只想在第一行中删除,但不更改其余文本框值

我尝试过但没有成功的内容

Textbox1.Lines[0] = Textbox1.Lines[0].Replace(" -", "");
c# string textbox multiline
1个回答
0
投票

根据the documentation属性的Lines

© www.soinside.com 2019 - 2024. All rights reserved.