Skip to content

Instantly share code, notes, and snippets.

@Unripe01
Unripe01 / SearchStringWithRegularExpressions
Created November 29, 2012 08:52
I want to write more simple [if] statement at [//Add a string all matching] comments
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace SearchStringWithRegularExpressions
{
class Program
@Unripe01
Unripe01 / Lambda with Return Value
Created November 28, 2012 05:00
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