The following works in .NET 5:
Func<IQueryable<string>, IQueryable<string>> f = s => s.Select(o => $"{o.Length}")
But in 6.0.100-preview.7.21373.8 it errors out:
error CS8640: Expression tree cannot contain value of ref struct or restricted type 'DefaultInterpolatedStringHandler'.
The following works in .NET 5:
Func<IQueryable<string>, IQueryable<string>> f = s => s.Select(o => $"{o.Length}")But in 6.0.100-preview.7.21373.8 it errors out: