I have an array from the dataTextBox field (3 lines).
And I need to delete first symbol in each line.
I’m trying to do it with only line line, but I cannot. This code doesn’t do anything.
How to write correct code? Thank You!
var lines = this.dataTextBox.Lines;
var sLines = Convert.ToString(lines[0]); //Converting first line to "String".
char[] ch = sLines.ToCharArray(); //Converting first line to "CharArray".
char s = sLines[0]; //I took the first letter from first line.
string x = Convert.ToString(s); //Converting to "String" the first letter from first line.
string b = x.Replace(x, ""); //Replacing the first letter from first line on "" symbol.
this.dataTextBox.Lines = lines.ToArray();
By the way… your code does something, but you assign
linestothis.dataTextBox.Linesalthough you never changedlines. The change is inbonly…