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

BenTam 1,781 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

Developer technologies C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.