You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
357 B
C#
16 lines
357 B
C#
/*
|
|
* C# Program to Illustrate Predicate
|
|
*/
|
|
using System;
|
|
|
|
class Program
|
|
{
|
|
static void Main()
|
|
{
|
|
Predicate<int> predicate = checkval => checkval == 6;
|
|
Console.WriteLine(predicate.Invoke(4));
|
|
Console.WriteLine(predicate.Invoke(5));
|
|
Console.WriteLine(predicate.Invoke(6));
|
|
Console.Read();
|
|
}
|
|
} |