Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Function 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 :: download file c# 
Csharp :: how to create advance search with parameter in asp.net mvc 
Csharp :: client = matrice[indexselectedclient] as String[]; 
Csharp :: c# nuint 
Csharp :: linq cross join 
Csharp :: model showing in scne view but not in game view 
Csharp :: c# execute run control panel 
Csharp :: null objects 
Csharp :: how to validate decimal number with percision of (25, 4) iin c# 
Csharp :: is odd c# stackoverflow 
Csharp :: check the request comes from which operating system used by user in asp net core 
Csharp :: vb.net single quote in string 
Csharp :: c# webclient ssl bypass 
Csharp :: windows forms tablelayoutpanel scroll 
Csharp :: convert array to datatable c# 
Csharp :: c# int array add number 
Csharp :: how to create a point c# 
Csharp :: change text color wpf 
Csharp :: Create an array with random values c# 
Csharp :: how to get day name from datetimepicker in c# 
Csharp :: out variable in c# 
Csharp :: function on program stops unity 
Csharp :: c# reduce a collection to a string 
Csharp :: git set origin url 
Html :: default html template 
Html :: sample text 
Html :: divi font awesome 
Html :: meta colors html 
Html :: html form enctype 
Html :: iframe youtube autoplay not working 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =