The following func should not yield an error, because the disposable is directly returned.
using System;
using System.IO;
namespace Disposeables {
class Program {
static void Main(string[] args) {
Func<MemoryStream> openStream = () => new MemoryStream();
}
}
}
The following func should not yield an error, because the disposable is directly returned.