You can’t.
You can only return object
, or container of objects, e.g. IEnumerable<object>
, IList<object>
, etc.
More Related Contents:
- A generic list of anonymous class
- Why doesn’t C# support the return of references?
- How do I make the return type of a method generic?
- Is there a way to return Anonymous Type from method?
- Convert Dictionary To Anonymous Object?
- Anonymous Types – Are there any distingushing characteristics?
- How to set value for property of an anonymous object?
- Return/consume dynamic anonymous type across assembly boundaries
- How to access property of anonymous type in C#?
- Anonymous Type vs Dynamic Type
- A dictionary where value is an anonymous type in C#
- How does ToString on an anonymous type work?
- prime number takes 0 arguments issue [closed]
- How do I remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?
- Tips for optimizing C#/.NET programs [closed]
- C# Convert string from UTF-8 to ISO-8859-1 (Latin1) H
- How to determine if a type implements a specific generic interface type
- Algorithm for simplifying decimal to fractions
- Mirroring console output to a file
- How to pass anonymous types as parameters?
- Change border color in TextBox C#
- How to take a screenshot of a WPF control?
- How to convert date format to DD-MM-YYYY in C#
- Resolving extension methods/LINQ ambiguity
- How to achieve remove_if functionality in .NET ConcurrentDictionary
- Remove Row inside TableLayoutPanel makes a layout problem
- Reading emails from Gmail in C#
- Tag helper not being processed in ASP.NET Core 2
- Is int? thread safe?
- How to empty/flush Windows READ disk cache in C#?