DataSource
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp16
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string[] Pdiller = { "C#", "Java", "Python", "Delphi"};
listBox1.DataSource = Pdiller;
/*foreach (string D in Pdiller)
{
listBox1.Items.Add(D);
}*/
}
}
}