Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# Predicate delegate

//one of three built-in generic delegate types:

static bool IsUpperCase(string str)
{
    return str.Equals(str.ToUpper());
}

static void Main(string[] args)
{
    Predicate<string> isUpper = IsUpperCase;

    bool result = isUpper("hello world!!");

    Console.WriteLine(result);
}
 
PREVIOUS NEXT
Tagged: #Predicate #delegate
ADD COMMENT
Topic
Name
5+2 =