最初または最後に特定の長さで部分文字列を削除しようとしています。
ここに私が書いたコードがありますが、動作しません。
this.temp = String.Empty;
foreach (string line in this.txtBox.Lines) {
if (Envir.Operations.Begin == true)
this.temp += line.Substring(Envir.Operations.Length - 1) + Environment.NewLine;
else
this.temp += line.Substring(0, line.Length - Envir.Operations.Length) + Environment.NewLine;
}
これを修正する方法があれば教えていただけますか?
どうもありがとう!