我想輸入一個字符串轉換成一個RichTextBox,雖然我得到以下錯誤:如何插入一個字符串到一個RichTextBox
Cannot implicitly convert type 'string[]' to 'string'
代碼如下:
private void testing_Click(object sender, EventArgs e)
{
// Get a ScheduledTasks object for the computer named "DALLAS"
string machineName = (@"\\" + System.Environment.MachineName);
ScheduledTasks st = new ScheduledTasks(machineName);
// Get an array of all the task names
string[] taskNames = st.GetTaskNames();
richTextBox6.Text = taskNames;
// Dispose the ScheduledTasks object to release COM resources.
st.Dispose();
}