Skip to content

Instantly share code, notes, and snippets.

@Unripe01
Created November 28, 2012 05:00
Show Gist options
  • Save Unripe01/4159121 to your computer and use it in GitHub Desktop.
Save Unripe01/4159121 to your computer and use it in GitHub Desktop.
Lambda with Return Value
//Has Return Value
bool isOK = ( (Func<bool>)( () => { return true;  } ) )();
System.Console.Write( isOK ); //true
 
//Has Return Value with Argument
bool isSame = ((Func< int, int, bool >)((i, j) => i == j))( 0, 1 );
System.Console.Write( isSame ); // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment