IEnumerableExtensions.AsSerializable<T> Method (IEnumerable<T>)

 

Convenience API to allow an IEnumerable{T} (such as returned by Linq2Sql) to be serialized by DataContractSerilizer.

Namespace:   Microsoft.Web.Mvc.Resources
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Syntax

public static IEnumerable<T> AsSerializable<T>(
    this IEnumerable<T> collection
)
where T : class
public:
generic<typename T>
where T : ref class
[ExtensionAttribute]
static IEnumerable<T>^ AsSerializable(
    IEnumerable<T>^ collection
)
static member AsSerializable<'T when 'T : not struct> : 
        collection:IEnumerable<'T> -> IEnumerable<'T>
<ExtensionAttribute>
Public Shared Function AsSerializable(Of T As Class) (
    collection As IEnumerable(Of T)
) As IEnumerable(Of T)

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<T>

The API to allow an IEnumerable{T}.

Type Parameters

  • T
    The type of the objects.

See Also

IEnumerableExtensions Class
Microsoft.Web.Mvc.Resources Namespace

Return to top