Error in C#: “An object reference is required for the non-static field, method, or property”
- 阅读更多 关于 Error in C#: “An object reference is required for the non-static field, method, or property”
问题 I wrote code in WPF. Firstly, I wrote a separate project to test work with a COM port device, and it worked well. Next I decided to integrate it in another project, but I get an error. I didn't change the code; I am just copied it into a new code file. This code works well: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows