Search
 
SCRIPT & CODE EXAMPLE
 

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);
}
Comment

c# predicate

Predicate<string> isUpper = delegate (string s) { return s.Equals(s.ToUpper()); };
bool result = isUpper("hello world!!");

Console.WriteLine("Predicate Delegate "+result);
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# convert string to base64 string 
Csharp :: Read csv file into wpf C# 
Csharp :: c# insert today datetime 
Csharp :: internal working of ioc container c# 
Csharp :: Go Statement in CSharp 
Csharp :: Calculate relative time in C# 
Csharp :: find the values of dictionaries in C sharp 
Csharp :: public controller script unity 3d 
Csharp :: windows forms webbrowser goforward 
Csharp :: clear highlight winforms treeview 
Csharp :: VSIX Project Context Menu 
Csharp :: c# pull request 
Csharp :: c# param exception 
Csharp :: c# check value at design time 
Csharp :: pyqt send message to another instance 
Csharp :: unity ar scale 
Csharp :: UnityEngine.Mesh:get_vertices() 
Csharp :: process method in scala 
Csharp :: how to show enum name list from input in swagger c# 
Csharp :: autoclicker for yes/no in c# indicator 
Csharp :: how to make build events always run visual studio 
Csharp :: openxml row count 
Csharp :: salary, overtime, deductions, gross pay and netpay in console C# 
Csharp :: how to check that a gameobject touches a colour in unity c# 
Csharp :: material Array setter 
Csharp :: check null type 
Csharp :: how to make character respawn if touches sprite c# 
Csharp :: C# Bitwise Left Shift 
Csharp :: best free Modern Design frameworks C# 
Csharp :: string in char list f# 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =