Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# Func Delegate

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

class Program
{
    static int Sum(int x, int y)
    {
        return x + y;
    }

    static void Main(string[] args)
    {
        Func<int,int, int> add = Sum;

        int result = add(10, 10);

        Console.WriteLine(result); 
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity check if transform doent have parent 
Csharp :: initialize c# array property of class object site:stackoverflow.com 
Csharp :: lamda expression multiple and 
Csharp :: shutdownHook c# 
Csharp :: unity on statement how 
Csharp :: c# ipaddress to integer 
Csharp :: CharacterController 
Csharp :: if statement to check if a time is between two times c# 
Csharp :: c sharp if statements 
Csharp :: firepower 4125 License update 
Csharp :: Make child unaffected by parents rotation Unity 
Csharp :: c# sha512 salt 
Csharp :: access form in a folder C# 
Csharp :: mouse position to canvas transform 
Csharp :: unity slider decimal 0.01 
Csharp :: how to change samesite=lax to samesite=none in asp.net 
Csharp :: unity follow object 
Csharp :: properties vs field c# 
Csharp :: radio buttons into database stackoverflow 
Csharp :: System.InvalidOperationException: No owin.Environment item was found in the context. 
Csharp :: c# create dll runtime 
Csharp :: stateteach.net 
Csharp :: .net SaveChanges vs update difference 
Csharp :: hacking 
Csharp :: pyqt single instance 
Csharp :: sqldatareader get row count 
Csharp :: constructor in protobuf-net 
Csharp :: c# quaternion eular calculator 
Csharp :: texture matrix 
Csharp :: draw table in console c# 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =