Skip to content

Instantly share code, notes, and snippets.

@tsubaki tsubaki/lambda_sample.cs
Last active Dec 13, 2015

Embed
What would you like to do?
ラムダ式サンプルその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
You can’t perform that action at this time.