简体   繁体   English

使用goto语句从一种方法跳转到另一种方法

[英]Jumping from one method to another using goto statement

我可以使用goto语句从c ++,java或c#中的一种方法跳转到另一种方法。

Not with java. 不适用于Java。 goto is a reserved word (statement) but it is not useable by design. goto是保留字(声明),但在设计上无法使用。

Further reading: 进一步阅读:

Not in C#. 不在C#中。 It is possible to jump inside one method though. 虽然可以跳入一种方法。

在VB6中,goto语句用于在同一方法内跳转某些位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM