CS0120: An object reference is required for the non-static field, method, or property 'Student_Form.StudentID_textBox'

BenTam 1,581 Reputation points
2022-09-06T04:14:46.693+00:00

Dear All,

I encounter an error "CS0120: An object reference is required for the non-static field, method, or property 'Student_Form.StudentID_textBox'".

238015-error.gif

I try to assign a value "0" to the textBox as shown in the screen capture below in the design time. I still get this error. Could anybody tell me how to fix it?

237985-textbox.gif

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,320 questions
{count} votes