It cannot be done by Func
but you can define a custom delegate
for it:
public delegate object MethodNameDelegate(ref float y);
Usage example:
public object MethodWithRefFloat(ref float y)
{
return null;
}
public void MethodCallThroughDelegate()
{
MethodNameDelegate myDelegate = MethodWithRefFloat;
float y = 0;
myDelegate(ref y);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…