How do I exit from a function?

前端 未结 7 1318
野的像风
野的像风 2021-02-18 20:18

i know that in vb.net you can just do Exit Sub

but i would like to know how do i exit a click event in a button?

here\'s my code:

pr         


        
7条回答
  •  既然无缘
    2021-02-18 21:11

    I'd suggest trying to avoid using return/exit if you don't have to. Some people will devoutly tell you to NEVER do it, but sometimes it just makes sense. However if you can structure you checks so that you don't have to enter into them, I think it makes it easier for people to follow your code later.

提交回复
热议问题