Returning anonymous type in C#

You can’t.

You can only return object, or container of objects, e.g. IEnumerable<object>, IList<object>, etc.

Leave a Comment