記事更新日: 2018年06月05日
強制終了だぜ☆
- It's an exit.
// Application.Run() を終了させる場合。 Application.Exit(); // アプリケーションを強制終了させる場合。 Environment.Exit(0);
また 0 かだぜ☆
- Also it is 0
os.Exit(1)
こんなんでいいのかなあ☆?
- Is it okay with this?
System.exit(0);
これでいいはず☆
- This should be okay.
throw new Error("エラーメッセージ");
強制終了の代わりにエラーを投げろだぜ☆
- Instead of forcibly terminate an error.
os.exit() // あるいは、main関数から return しろだぜ☆
Goに似ているな☆
- It looks like Go.
exit(0); exit("エラーメッセージ");
関数ではなくて、言語の命令文らしいぜ☆
- It is not a function, it seems to be a statement of language.
exit exit!
ふーん☆
- Hmm.
use std; std::process::exit(1);
これでいいだろ☆
- Is this OK?