- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
namespace ConsoleApplication
{
public static class Program
{
private static void Main( string[] args )
{
new Random().Next( -100, 100 )
.Execute( x => Console.Write( $"{x} это " ) )
.IfElse( x => x % 2 == 0, () => Console.Write( "четное " ), () => Console.Write( "нечетное " ) )
.Execute( () => Console.Write( "число " ) )
.IfElse( x => x > 0, () => Console.Write( "больше " ), () => Console.Write( "меньше " ) )
.Execute( () => Console.Write( "нуля" ) )
.Execute( () => Console.WriteLine() );
}
}
}
Dummy00001 14.12.2015 17:28 # +6
imihajlov 14.12.2015 17:43 # 0
roman-kashitsyn 14.12.2015 17:49 # +9
someone 15.12.2015 09:26 # 0
guest 15.12.2015 11:07 # 0
guest 15.12.2015 11:07 # 0
TarasB 15.12.2015 10:44 # +2
Lure Of Chaos 15.12.2015 21:59 # 0
inkanus-gray 14.12.2015 18:57 # +2
Soul_re@ver 14.12.2015 23:53 # +1
>findstr /I /N "if" 19180.txt
9: .IfElse( x => x % 2 == 0, () => Console.Write( "четное " ), () => Console.Write( "нечетное " ) )
11: .IfElse( x => x > 0, () => Console.Write( "больше " ), () => Console.Write( "меньше " ) )
inkanus-gray 15.12.2015 02:47 # +2
Steve_Brown 15.12.2015 17:12 # 0
InvalidOperationException