Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试更改 C#.NET 中标签的文本。
我在用HjälpText.Text = "Hjälp mig.";
HjälpText.Text = "Hjälp mig.";
在调试模式下运行时,代码抛出以下异常
NullReferenceException 未处理。 你调用的对象是空的。
NullReferenceException 未处理。
你调用的对象是空的。
我错过了什么吗?
我已经解决了我的问题。
edhedges 引导我查看我的代码,我注意到我放错了代码行的位置。它不在“_Load”方法中,而是在初始化组件的方法之前。