开发者

Form.Show method error C#

开发者 https://www.devze.com 2023-03-26 22:35 出处:网络
I have a problem. I have this code: ..... Form11.show(); ..... Why it does not works? My IDE is shouting on me:

I have a problem. I have this code:

.....
Form11.show();
.....

Why it does not works? My IDE is shouting on me: http://prntscr.com/2kfkw Why? How c开发者_开发百科an I repair it? Please help me.


First, I think "show" should be capitalized. Second, you want to create an instance of your form, then show it:

        Form1 myForm = new Form1();
        myForm.Show();


C# is case sensitive; the method name you want is probably Show().


try like this

new Form11().Show();


I think it should be a capital S on the method name, i.e. Form1.Show();


C# is case sensitive. Use

Form11.Show();

instead of

Form11.show();


 Form11 form = new Form11();
 form.Show();
0

精彩评论

暂无评论...
验证码 换一张
取 消