How do I use a variable declared in a method, outside that method?

后端 未结 6 1493
眼角桃花
眼角桃花 2021-01-27 00:26

I am using VS 2008 (C#)... I have created a function in a GlobalClass to use it globally.. This is for opening a dialog box. When I call this function in my method it works but

6条回答
  •  时光取名叫无心
    2021-01-27 01:00

    Either change the method to return the filename or the dialog object itself Or move the openfiledialog into an seperate property outside the method

提交回复
热议问题