SerializerTSerialize Method (IEnumerableT, String, Encoding) |
Serializes a list of objects to a file.
Namespace:
Enkoni.Framework.Serialization
Assembly:
Enkoni.Framework.Serialization (in Enkoni.Framework.Serialization.dll) Version: 1.3.0.1
Syntaxpublic int Serialize(
IEnumerable<T> objects,
string filePath,
Encoding encoding
)
Public Function Serialize (
objects As IEnumerable(Of T),
filePath As String,
encoding As Encoding
) As Integer
public:
int Serialize(
IEnumerable<T>^ objects,
String^ filePath,
Encoding^ encoding
)
member Serialize :
objects : IEnumerable<'T> *
filePath : string *
encoding : Encoding -> int
Parameters
- objects
- Type: System.Collections.GenericIEnumerableT
The collection of objects that must be serialized. - filePath
- Type: SystemString
The name of the output file. - encoding
- Type: System.TextEncoding
The encoding that must be used to serialize the data.
Return Value
Type:
Int32The number of bytes that have been written to the file.
Exceptions
See Also