I have the following method in an assembly:
public string dostuff(string foo, object bar = null) { /* ... */ }
I use it as a callback, so a reference to it is passed to another assembly as such:
Func<string, object, string> dostuff
Now in the original form, I can call it without specifying that second argument, which defaults to null
. But when I use it as a callback in that second assembly, I must specify that second argument.
What syntax allows me to ignore that second argument?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…