You can either pass the name of a function, such as MyFunction
, that has no inputs and returns a string
string MyFunction()
{
return "string";
}
or use a lambda expression such as () => "string"
2
solved Passing a func as parameter
You can either pass the name of a function, such as MyFunction
, that has no inputs and returns a string
string MyFunction()
{
return "string";
}
or use a lambda expression such as () => "string"
2
solved Passing a func as parameter