Вывести текст в Windows form - C#
Формулировка задачи:
На форме два textBox1(выводится) и TextBox2(берется) и кнопка в TextBox2 вводим символ по которому производится выборка из массива. Как результат вывести в textBox1?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace формированиеXMLизЗапросаLinq
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
string[] names = { "asd", "asd", "ftfj", "ssss", "ddd", "aaa", "wwww", "fff", "few", "eds", "qxv"} ;
var queryResults =
from n in names
where n.StartsWith("a")
select n;
textBox1.Text = (queryResults);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}Решение задачи: «Вывести текст в Windows form»
textual
Листинг программы
this.textBox1.Text = "то, что надо вставить";