C# newbie question here. The following code (taken from the book \"C# From Novice to Professional\" by Christian Gross, Apress) gives an error:
worksheet.Ad
VS claims that both args in the method call above are of type object whereas the method accepts only Func. But the value of both worksheet elements is of type Func
Yes, but the declared type is object. The compiler can't know that the actual runtime type will be Func, so an explicit cast is necessary.