2012-01-08 27 views
-4

我要分配給文本RichTextBox的,分配值的RichTextBox

richTextEditor.Lines[1] = "sdfdsf"; // Not working 
+4

「不工作」是一個很壞的問題描述。解釋確切_what_不起作用。你有錯誤嗎?例外?他們是什麼? – Oded 2012-01-08 12:21:27

回答

1

AFAIK,所述Lines陣列的單個元件不能設置,只有整個陣列本身。你可以嘗試這樣的:

string[] temp = richTextEditor.Lines; 
temp[1] = "sdfdsf"; 
richTextEditor.Lines = temp;