Say I have the following
public T Example(Func<T> f)
{
Contract.Requires(f != null);
Contract.Requires(f() != null); // no surprise, this is an error
...
}
Is there any way to specify that my Func
parameters must obey some contracts?