how to call non static method in window console application

前端 未结 5 1230
萌比男神i
萌比男神i 2021-01-24 22:16

I built a console application and I\'m trying to test if my application works as expected.
I create an instance of the API class as shown in the code below but I receive an

5条回答
  •  Happy的楠姐
    2021-01-24 22:51

    You must mark ConStr, bin_Num and lblResults as static.

    static String ConStr = "SERVER=myservername; Database=mydb; UID=mylogin; PWD=mypassword;encrypt=no;enlist=false";
    static    String bin_Num = "201284-11-000";
    static    Label lblResults;
    

提交回复
热议问题