Step 1: Click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "BindingSourceDemo" and then click OK
Step 2: Design your form as below

You need to create a user class
public class Users
{
public string Username { get; set; }
public string Password { get; set; }
}
Add a bindingsource, bindingnavigator to your windows form application as below

Step 3: Add code to handle your form as below
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 BindingSourceDemo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//Add user to binding source
usersBindingSource.Add(new Users() { Username = "admin", Password = "admin" });
usersBindingSource.Add(new Users() { Username = "user", Password = "123" });
usersBindingSource.Add(new Users() { Username = "sa", Password = "admin" });
usersBindingSource.Add(new Users() { Username = "lucy", Password = "123@qaz" });
}
}
}
VIDEO TUTORIALS