You can’t.
You can only return object
, or container of objects, e.g. IEnumerable<object>
, IList<object>
, etc.
Related Contents:
- A generic list of anonymous class
- How do I make the return type of a method generic?
- Why doesn’t C# support the return of references?
- 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 do I abort/cancel TPL Tasks?
- How can I convert an integer into its verbal representation?
- Priority queue in .Net [closed]
- Why does my .NET 4 application know .NET 4 is not installed
- Detecting USB drive insertion and removal using windows service and c#
- How can I create a self-signed certificate using C#?
- Getting image dimensions without reading the entire file
- How to read and modify NTFS Alternate Data Streams using .NET [closed]
- Print Pdf in C# [closed]
- How to handle click event in Button Column in Datagridview?
- How to play a sound in C#, .NET
- GetHashCode Guidelines in C#
- How to properly make a http web GET request
- How do I disable a system device programmatically?
- Compute the DateTime of an upcoming weekday
- Query an XDocument for elements by name at any depth
- Performance Tests of Serializations used by WCF Bindings
- What’s the best way to calculate the size of a directory in .NET?
- Why is Application.Restart() not reliable?
- Should you implement IDisposable.Dispose() so that it never throws?
- How can I install a certificate into the local machine store programmatically using c#?
- How do I print out a tree structure?
- ASP.NET MVC – How to show unauthorized error on login page?
- User Activity Logging, Telemetry (and Variables in Global Exception Handlers)
- Does String.GetHashCode consider the full string or only part of it?
- Good introduction to the .NET Reactive Framework [closed]
- file write permission issue under “Program Files” folder
- Get Application’s Window Handles
- Exception.Message vs Exception.ToString()
- How can I make a ComboBox non-editable in .NET?
- How to hide public methods from IntelliSense
- OWIN’s GetExternalLoginInfoAsync Always Returns null
- How to convert a simple .Net console project a into portable exe with Mono and mkbundle?
- Ignoring a field during .NET JSON serialization; similar to [XmlIgnore]?
- Is Int32.ToString() culture-specific?
- modifying the registry key value
- How to sort a dictionary by key
- Can I use Linq’s Except() with a lambda expression comparer?
- How to get the current user’s Active Directory details in C#