predicate deligate code example
Example 1: predicate c#
static void Main(string[] args)
{
Predicate<string> isUpper = delegate(string s) { return s.Equals(s.ToUpper());};
bool result = isUpper("hello world!!");
}
Example 2: predicate c#
static void Main(string[] args)
{
Predicate<string> isUpper = s => s.Equals(s.ToUpper());
bool result = isUpper("hello world!!");
}