Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active December 13, 2015 21:28
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 tsubaki/4977434 to your computer and use it in GitHub Desktop.
Save tsubaki/4977434 to your computer and use it in GitHub Desktop.
ラムダ式サンプルその1
void Awake()
{
Function( err =>{ Debug.Log(err); }); // 1
Function( DebugLog ); // 2
}
// 1と2に必要
delegate void ErrorMessage(string str);
void Function(ErrorMessage err)
{
if( err != null)
err("ERROR!!!!!");
}
// 2のみ必要
void DebugLog(string err)
{
Debug.Log(err);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment