I get a compilation error in the follwoing code.
Error 1 An object reference is required for the non-static field, method, or property 'System.Windows.Forms.BindingSource.DataMember.get'
Error 2 An object reference is required for the non-static field, method, or property 'System.Windows.Forms.BindingSource.DataSource.get'
private void Form1_Load(object sender, EventArgs e)
DBO db = new DBO();
BindingSource.DataMember = "Sample";
BindingSource.DataSource = db;
How can I solve the problem?