且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

对象引用参考未设置问题

更新时间:2023-01-17 17:44:34

在将文本框(和表单)设置为值之前,请确保已实例化该文本框(和窗体).
Make sure the textbox (and form) has actually been instantiated before setting it to a value.


您的第一类未初始化.
所以这个属性不是一流的


当您尝试为空引用分配值时,通常会触发未设置对象引用的对象引用.
your first class is not initialized.
so the property is nothing of the first class


object reference not set to an instance of object error is fired generally when you try to assign a value to null reference.


当我通过发送实际this引用作为方法传递时,就解决了争论并在第二堂课中使用该引用.
got resolved as i pass the actual reference by sending (this) as method arguemnt and using that reference in second class.