RichTextBox question
C#
3
Posts
2
Posters
0
Views
1
Watching
-
[LocalizableAttribute(true)] public string[] Lines { get; set; }
If this property is an Array? How can I add a text to a specific line or read a specific line? this wont workthis.richTextBox.Lines[2] = "row 3";
Lines
returns a read-only array. You can't set individual elements. However, you can replace the array:string[] newLines = (string[])(this.richTextBox.Lines.Clone());
newLines[2] = "row 3";
this.richTextBox.Lines = newLines-- I've killed again, haven't I?
-
Lines
returns a read-only array. You can't set individual elements. However, you can replace the array:string[] newLines = (string[])(this.richTextBox.Lines.Clone());
newLines[2] = "row 3";
this.richTextBox.Lines = newLines-- I've killed again, haven't I?