Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active December 2, 2020 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/16232fa0ba1d258a5e8acadc12946f1d to your computer and use it in GitHub Desktop.
Save todorok1/16232fa0ba1d258a5e8acadc12946f1d to your computer and use it in GitHub Desktop.
例外を握り潰すパターン
try
{
string num = "one";
int stringNumber = int.Parse(num);
Debug.Log($"変換された値は{stringNumber}でした。");
}
catch (Exception e)
{
// 何もしないで抜けちゃうよー
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment