You can create delegate type declaration:
delegate int del(int number);
and then assign and use it:
del square = delegate(int x)
{
return x * x;
};
int result= square (5);
Or as said, you can use a "shortcut" to delegates (it made from delegates) and use:
Func<[inputType], [outputType]> [methodName]= [inputValue]=>[returnValue]
for example:
Func square = x=>x*x;
int result=square(5);
You also have two other shortcuts:
Func with no parameter: Func p=()=>8;
Func with two parameters: Func p=(a,b)=>a+b;